STM32G0 crashes into system memory bootloader everytime during debug
The codebase is generated by CubeMX and now I'm facing issues during debug.
debug method is SWD using ST-LINK V2.
In debug mode, after resume fron HAL_Init(); , the code will crashed into system memory zone and have no debug information.
Break at address "0x1fff12ca" with no debug information available, or outside of program code.the location of the address varies around 0x1fffxxxx sometimes.
to be exact, the crash will happen when:
Initialize the IWDG
Using Flash R/W Operation
Start Timer (But not Init)
In STM32G031, 0x1fff12ca is located at system memory area where it houses the factory bootloader.
What confuses me is, I have another code project that has basically the same start up code at main() but it works just fine (in another STM32G031, and hardware connection is the same regarding BOOT0 pin). Tried Clean project and rebuild, restart IDE and change optimization, changing minimum heap and stack, absolutely no help whatsoever. I have not try to load the codes to another STM32G031 yet but what will be the possible reason that causes this?
