Here is a bug in the S32's startup_S32K148.S file?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Here is a bug in the S32's startup_S32K148.S file?

1,254 次查看
kongdetao
Contributor III

Dear,

      Read the following source code , I am not sure whether it's a bug in the line6 and line 7?

      I doubt, if __RAM_END -  __RAM_START = 1, the ble will skip to .LC5. So, the byte can't be initialized.

....

#ifdef START_FROM_FLASH
/* Init ECC RAM */
ldr r1, =__RAM_START
 ldr r2, =__RAM_END
subs r2, r1
 subs r2, #1
 ble .LC5
 movs r0, 0
 movs r3, #4
.LC4:
 str r0, [r1]
 add r1, r1, r3
 subs r2, 4
 bge .LC4
.LC5:
#endif
标记 (3)
0 项奖励
回复
1 回复

1,122 次查看
stanish
NXP Employee
NXP Employee

Hi,

I'm not sure where this startup snippet you posted comes from (new S32DS project or an example project).

Anyway, I'd recommend you to check how the addresses  __RAM_START and __RAM_END are calculated in the linker .ld file in your project.

I'd guess since the comment is referring to ECC these symbols refer to the entire available RAM on the device rather then just actual size of used ram.

Hope it helps.

Stan

0 项奖励
回复