After using bootlaoder to flash the app code, I found that it would enter HardFault_Handler, but not when using s32ds to flash. I also exported the hex of the two different flashing methods into the memory and compared them. I found that they were exactly the same, but the one that was flashed using boot would enter HardFault_Handler after restarting.
Hi @xsong
most likely, the SRAM is not initialized. These are typical symptoms.
From reference manual:
You can find something like this in startup code:
And the same for ITCM and DTCM memories... So, check how it is done in your bootloader.
Regards,
Lukas