TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS320F28388D: 使用DCSM模块对芯片加密,重新上电后,将板子Boot引导模式改为wait模式,Release下可以下载程序, 但是Debug情况下无法下载调试程序?

Part Number:TMS320F28388D

基于dcsm_security_tool例程修改了DCSM密码,重新上电后,将板子Boot引导模式改为wait模式,Release下可以下载程序; 但是Debug情况下无法下载调试程序。

请问这是为什么?需要怎么操作?ps:仿真器可以连接到28388

错误显示为Load program Error

请问这个是为什么?

Green Deng:

你好,是只对例程的密码进行了修改吗?具体如何修改的?

另外,板子改了密码之后有将程序烧写进flash吗?还是只是改完运行了一下程序?

报错的具体内容是什么

,

user6327524:

你好,我的问题主要是加入了DCSM模块,Release下载程序正常,但是无法在Debug模式下运行调试程序了;

1、把密码和boot pin都修改了,具体修改情况如下:

;----------------------------------------------------------------------
; Zone 1
;----------------------------------------------------------------------.sect "dcsm_otp_z1_linkpointer".retain.long 0x00003FFF.long 0x00003FFF.long 0x00003FFF.sect "dcsm_otp_z1_jlm_enable".retain.long 0xFFFF000F;Z1OTP_JLM_ENABLE
;;.sect "dcsm_otp_z1_jtag_pswdh"
;;.retain
;;.long 0x4BFFFFFF;Z1OTP_JTAGPSWDH0
;;.long 0x3FFFFFFF;Z1OTP_JTAGPSWDH1.sect "dcsm_otp_z1_cmac_key".retain.long 0x00000000;Z1OTP_CMACKEY0.long 0x00000000;Z1OTP_CMACKEY1.long 0x00000000;Z1OTP_CMACKEY2.long 0x00000000;Z1OTP_CMACKEY3.sect "dcsm_otp_z1_pswdlock".retain.long 0xFB7FFFFF.sect "dcsm_otp_z1_crclock".retain.long 0x7FFFFFFF.sect "dcsm_otp_z1_gpreg".retain.long 0x5A666554;Z1OTP_GPREG1 = Z1_BOOTPIN.long 0x5AFFFF1F;Z1OTP_GPREG2.long 0x0924C103;Z1OTP_GPREG3 = Z1OTP_BOOTDEF_LOW.long 0x0A032605;Z1OTP_GPREG4 = Z1OTP_BOOTDEF_HIGH.sect "dcsm_zsel_z1".retain.long 0x11111111;Z1OTP_CSMPSWD0 (LSW of 128-bit password).long 0x4D7F2222;Z1OTP_CSMPSWD1.long 0x33333333;Z1OTP_CSMPSWD2.long 0x44444444;Z1OTP_CSMPSWD3 (MSW of 128-bit password).long 0x05555555;Z1OTP_GRABSECT1.long 0x0AAAAAAA;Z1OTP_GRABSECT2.long 0x0AAAAAAA;Z1OTP_GRABSECT3.long 0x00055555;Z1OTP_GRABRAM1.long 0x55555505;Z1OTP_GRABRAM2.long 0x00055555;Z1OTP_GRABRAM3.long 0x3FFF3FFF;Z1OTP_EXEONLYSECT1.long 0x00003FFF;Z1OTP_EXEONLYSECT2.long 0xFFC303FF;Z1OTP_EXEONLYRAM1.long 0xFFFFFFFF;Reserved.long 0xFFFFFFFF;Z1OTP_JTAGPSWDL0.long 0x2BFFFFFF;Z1OTP_JTAGPSWDL1;----------------------------------------------------------------------; 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 0x00003FFF.long 0x00003FFF.long 0x00003FFF.sect "dcsm_rsvd_z2".retain.long 0xFFFFFFFF;Reserved.sect "dcsm_otp_z2_pswdlock".retain.long 0x1F7FFFFF.sect "dcsm_otp_z2_crclock".retain.long 0x3FFFFFFF;;.sect "dcsm_otp_z2_gpreg"
;;.retain
;;.long 0x5AFF4854;Z2OTP_GPREG1 = Z2_BOOTPIN
;;.long 0x5AFFFF3F;Z2OTP_GPREG2
;;.long 0x00000000;Z2OTP_GPREG3 = Z2OTP_BOOTDEF_LOW
;;.long 0xFFFFFFFF;Z2OTP_GPREG4 = Z2OTP_BOOTDEF_HIGH.sect "dcsm_rsvd1_z2".retain.long 0xFFFFFFFF;Reserved.long 0xFFFFFFFF;Reserved.sect "dcsm_zsel_z2".retain.long 0xFFFFFFFF;Z2OTP_CSMPSWD0 (LSW of 128-bit password).long 0x1F7FFFFF;Z2OTP_CSMPSWD1.long 0xFFFFFFFF;Z2OTP_CSMPSWD2.long 0xFFFFFFFF;Z2OTP_CSMPSWD3 (MSW of 128-bit password).long 0x0AAAAAAA;Z2OTP_GRABSECT1.long 0x0AAAAAAA;Z2OTP_GRABSECT2.long 0x0AAAAAAA;Z2OTP_GRABSECT3.long 0x000AAAAA;Z2OTP_GRABRAM1.long 0xAAAAAA0A;Z2OTP_GRABRAM2.long 0x000AAAAA;Z2OTP_GRABRAM3.long 0x3FFF3FFF;Z2OTP_EXEONLYSECT1.long 0x00003FFF;Z2OTP_EXEONLYSECT2.long 0xFFC303FF;Z2OTP_EXEONLYRAM1.long 0xFFFFFFFF;Reserved.long 0xFFFFFFFF;Reserved.long 0xFFFFFFFF;Reserved;----------------------------------------------------------------------; 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_z2" can be used to program these locations to 0x0000.
; This code is commented out for development.;.sect "dcsm_rsvd_z2"
;.loop (1e0h)
;.int 0x0000
;.endloop;----------------------------------------------------------------------
; End of file
;----------------------------------------------------------------------

2、板子改了密码,将程序烧写进去了,查看OTP可以看到修改的DCSM数据

3、debug下报错的具体内容为:

28xx_CPU1: File Loader: Verification failed: Values at address 0x08000@Program do not match Please verify target memory and memory map.C28xx_CPU1: GEL: File: E:\v10C2000code\xxxxxx\CPU1_RAM\xxxxxx_CPU1.out: a data verification error occurred, file load failed.

,

Green Deng:

额,把OTP的boot pin也改了的话检查起程序来太麻烦了

需要注意的是,OTP只能修改一次,烧写进flash后就不能再更改了,你这是第一次修改OTP吗?

另外这个报错你可以参考这两个帖子的方案看看:

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/807535/ccs-tms320f28377d-c28xx_cpu1-file-loader-verification-failed-values-at-address-0x80000-program-do-not-match-please-verify-target-memory-and-memory-map

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/634785/ccs-tms320f28377d-data-verification-failed-at-address-0x00080000-please-verify-target-memory-and-memory-map

,

user6327524:

哦哦,这个是我第一次改OTP,我把CPU1的RAM和FLASH全部设置为了Secured by this Zone(Zone1)

然后我看了下Debug下报错的位置

28xx_CPU1: File Loader: Verification failed: Values at address 0x08000@Program do not match Please verify target memory and memory map.C28xx_CPU1: GEL: File: E:\v10C2000code\xxxxxx\CPU1_RAM\xxxxxx_CPU1.out: a data verification error occurred, file load failed.

0x08000在Flash和Debug下对应的Map文件;

在debug下:0x08000对应的为  .text.1段 里面是我自己写的程序

在Flash下:0x08000对应的为 RamfuncsRunstart 请问和这个有关系吗?

,

user6327524:

您好,问题已解决,是我的配置有点问题,可以下载程序了

,

Green Deng:

好的好的,感谢反馈。

方便的话可以分享一下解决方案。

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F28388D: 使用DCSM模块对芯片加密,重新上电后,将板子Boot引导模式改为wait模式,Release下可以下载程序, 但是Debug情况下无法下载调试程序?
分享到: 更多 (0)