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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

660 Views
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
0 Kudos
1 Reply

528 Views
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 Kudos