This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

28069加密后,C2000-GANG可以读出Falsh文件,加密不起作用????怎么解决?

Other Parts Discussed in Thread: C2000-GANG

使用F2806x_CSMPasswords.asm文件添加到工程中,设置好密码,编译可以通过,生成的HEX文件使用C2000_GANG烧写成功,但是使用C2000_GANG界面中的读数据,可以把烧写进去的HEX文件给读出来,加密不起作用????是不在主程序中还要进行相关配置,还是CMD文件不对?

F2806x_CSMPasswords.asm中的代码如下:


.sect "csmpasswds"

.int 0x1111 ;PWL0 (LSW of 128-bit password)
.int 0x2222 ;PWL1
.int 0x3333 ;PWL2
.int 0x4444 ;PWL3
.int 0x5555 ;PWL4
.int 0x6666 ;PWL5
.int 0x7777 ;PWL6
.int 0x8888 ;PWL7 (MSW of 128-bit password)


.sect "csm_rsvd"
.loop (3F7FF5h - 3F7F80h + 1)
.int 0x0000
.endloop
CMD文件相关内容如下:

MEMORY
{
PAGE 0 : /* Program Memory */
/* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
RAML0 : origin = 0x008000, length = 0x000800 /* on-chip RAM block L0 */
RAML1 : origin = 0x008800, length = 0x000400 /* on-chip RAM block L1 */
OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */

FLASHH : origin = 0x3D8000, length = 0x004000 /* on-chip FLASH */
FLASHE : origin = 0x3DC000, length = 0x00C000 /* on-chip FLASH */
FLASHD : origin = 0x3E8000, length = 0x004000 /* on-chip FLASH */
FLASHC : origin = 0x3EC000, length = 0x004000 /* on-chip FLASH */
FLASHA : origin = 0x3F4000, length = 0x003F80 /* on-chip FLASH */
CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
BEGIN : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
CSM_PWL_P0 : origin = 0x3F7FF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */

SECTIONS
{

/* Allocate program areas: */
.cinit : > FLASHA, PAGE = 0 //初始化的变量和常量表
.pinit : > FLASHA, PAGE = 0 //全局构造器(C++) 初始化的变量和常量表
.text : > FLASHE, PAGE = 0 //可执行代码和常数
codestart : > BEGIN, PAGE = 0
ramfuncs : LOAD = FLASHD,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0

csmpasswds : > CSM_PWL_P0, PAGE = 0
csm_rsvd : > CSM_RSVD, PAGE = 0
/* Allocate uninitalized data sections: */
.stack : > RAMM0, PAGE = 1
.ebss : > RAML3, PAGE = 1 /*RAML3*/
.esysmem : > RAML2, PAGE = 1