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.

关于CSM的密码设置问题和一个 .ovly段的问题

在看 28035的CMD文件的时候,发现下面一个定义,但找到解释,不知道这个 .ovly是什么段。

.ovly : > FLASHA, PAGE = 0

 

对芯片加密的时候,对CSM128位设定密码,如果想区分在不同的情况下,使用不同的密码,可行吗?看到一种写法如下:

.if 0             ; no password            

.int 0xFFFF  ;PWL0 (LSW of 128-bit password)      

 .int 0xFFFF  ;PWL1      

 .int 0xFFFF  ;PWL2      

 .int 0xFFFF  ;PWL3      

 .int 0xFFFF  ;PWL4      

 .int 0xFFFF  ;PWL5      

 .int 0xFFFF  ;PWL6      

 .int 0xFFFF  ;PWL7 (MSW of 128-bit password)

 .elseif 0             ;password  1

.int 0x33FF  ;PWL0 (LSW of 128-bit password)     

.int 0x33FF  ;PWL1     

.int 0x33FF  ;PWL2     

.int 0xFFFF  ;PWL3     

.int 0xFFFF  ;PWL4     

.int 0x33FF  ;PWL5     

.int 0xFFFF  ;PWL6     

.int 0xFFFF  ;PWL7 (MSW of 128-bit password)

.elseif 1         ;  password 2

.int 0x55FF  ;PWL0 (LSW of 128-bit password)    

.int 0x55FF  ;PWL1    

.int 0x55FF  ;PWL2    

.int 0xFFFF  ;PWL3    

.int 0xFFFF  ;PWL4    

.int 0x55FF  ;PWL5    

.int 0xFFFF  ;PWL6    

.int 0xFFFF  ;PWL7 (MSW of 128-bit password)

.endif

这种写法对吗?通过那个值来区分3种不同的密码吗?他的.if的判断没有任何的比较,是存在什么默认的比较值,还是在CCS里面能设置呀?

 

谢谢

  • .ovly 应该是自定义的段。他的这种写法就是为了方便,不用改密码。if 0就是不成立,elseif 0也不成立,elseif 1成立,用最后一个密码组。下次想换密码了改两个数字就好了。

  • 关于.ovly段,在spru513g TMS320C28x Assembly Language Tools v6.2.4的PDF中,有这样一段话:The linker generates a unique name for each overlay copy table input section. For example, table(_first_ctbl) would place the copy table for the .first section into an input section called .ovly:_first_ctbl.(8.8.8节,P240),而且后面有很多的例子,比如P240下面的例子。和P330的例子。这个段应该是默认的段或是定义好的段,但到底怎么用,哪有更详细的说明呢?