2025-04-17 5:09 AM
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?
Solved! Go to Solution.
2025-08-27 6:29 AM
Thank you for this comment. I was breaking my head over why my STM32G0 would boot into bootloader on my new board every time.
Your comment let me to powercycle the board and now it works. Apparently this happened because I started my board with empty memory, then programmed it and apparently the EMPTY check bit was still set.
It worked on STM32CubeIDE with a blank project but not on my mbed-ce project. There must be something in STM32CubeIDE that is smarter than my VSCode+mbed-ce setup.
Anyway, thanks!