下面是DCSM设置
;----------------------------------------------------------------------
; Zone 1
;----------------------------------------------------------------------
.sect "dcsm_otp_z1_linkpointer"
.retain
.long 0x1FFFFFFC
.long 0xFFFFFFFF ;Reserved
.long 0x1FFFFFFC
.long 0xFFFFFFFF ;Reserved
.long 0x1FFFFFFC
.long 0xFFFFFFFF ;Reserved
.sect "dcsm_otp_z1_pswdlock"
.retain
.long 0xFFFFFFF0
.long 0xFFFFFFFF ;Reserved
.sect "dcsm_otp_z1_crclock"
.retain
.long 0xFFFFFFF0
.long 0xFFFFFFFF ;Reserved
;; .sect "dcsm_otp_z1_bootctrl"
;; .retain
;; .long 0xFFFFFFFF ;Reserved
;; .long 0x49550B5A
.sect "dcsm_zsel_z1"
.retain
.long 0x000000FF ;Z1-EXEONLYRAM
.long 0x00003FFF ;Z1-EXEONLYSECT
.long 0x10005555 ;Z1-GRABRAM
.long 0x05555555 ;Z1-GRABSECT
.long 0xFFFFFFFE
.long 0xFFFFFFFE
.long 0xFFFFFFFE
.long 0xFFFFFFFE
;----------------------------------------------------------------------
; For code security operation,after development has completed, prior to
; production, all other zone select block locations should be programmed
; to 0x0000 for maximum security.
; If the first zone select block at offset 0x10 is used, the section
; "dcsm_rsvd_z1" can be used to program these locations to 0x0000.
; This code is commented out for development.
; .sect "dcsm_rsvd_z1"
; .loop (1e0h)
; .int 0x0000
; .endloop
;----------------------------------------------------------------------
; Zone 2
;----------------------------------------------------------------------
;; .sect "dcsm_otp_z2_linkpointer"
;; .retain
;; .long 0x1FFFFFFF
;; .long 0xFFFFFFFF ;Reserved
加密后程序能正常运行,但无法连接芯片,提示如下错误
C28xx_CPU1: Trouble Halting Target CPU: (Error -1156 @ 0x0) Device may be operating in low-power mode. Do you want to bring it out of this mode? Choose 'Yes' to force the device to wake up and retry the operation. Choose 'No' to retry the operation without waking the device. (Emulation package 9.4.0.00129)
C28xx_CPU1: Error: (Error -2134 @ 0x0) Unable to control device execution state. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 9.4.0.00129)
C28xx_CPU1: Error: (Error -1135 @ 0x0) The debug probe reported an error. Confirm debug probe configuration and connections, reset the debug probe, and retry the operation. (Emulation package 9.4.0.00129)
C28xx_CPU1: Unable to determine target status after 20 attempts
C28xx_CPU1: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging
C28xx_CPU1: GEL: Error while executing OnTargetConnect(): Could not write 0x0005F412@Data: target is not connected
at *((int*) 0x5F412)=0x000F [f28377d_cpu1.gel:79]
at OnTargetConnect()