Hi @udoeb ,
Happy New Year!
Thanks to @carstengroen reply, you are totally correct!
When the MCUXrpesso startup didn't reset the SP, and the IVT entry is the reset handler, the BootROM jump to the APP will still use the BootROM's stack, from the RM system boot chapter, BootROM stack is put in the OCRAM, then, if the app code also put the RW,ZI section into that OCRAM, then when the App run and use the stack, it may cause the App RW, ZI data break issues, then the app may run into the abnormal.
So, normally, we will do :
reset SP
systemInit()
data/bss/ramfunc initialize
Jump to main
In fact, in the old SDK MCUXpresso IDE project, we didn't add this reset SP code, so I also meet one issue when testing the RT10XX dev_cdc_vcom_freertos demo, when using the IVT as the reset handler address, then the code runs abnormal, at last, we find we need to reset the SP to solve this issues, so in the new SDK MCUXPresso IDE project, we add it.
Wish it helps you!
Best Regards,
kerry