cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging startup won't progress past: bl SystemInit

Dossy
Associate II

Firstly I'm very new to all of this so apologies if this is trivial.

I have been trying to debug and run a simple blinking led project onto a STM32WB nucleo board using the STM32CubeIDE v1.0 (MacOS). After staring the debugging session, the console displays download verified successfully yet I do not have the option to run the project only pause or terminate.

Using breakpoints it seems to be getting hung up at the line, bl SystemInit in the file startup_stm32wb55rgvx.s and never actually gets to the main function.

The project was created with the cubeMX inside the IDE. All firmware and software has been updated.

Im asking this here because I have had success with the Atollic TrueStudio IDE which makes me think this issue is IDE based?? Or do i just have change some settings?

8 REPLIES 8

Well indicative of some broken expectations in the function. You should stop the debugger and SEE where it is stuck, most likely the Error_Handler or HardFault_Handler.

Often dependencies on clock inputs, pll and flash wait state settings.

Check also compiler/linker command line settings passed by the tool chain, and as meta data in the project itself.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
johnjohn9105
Associate III

It's almost certainly not the IDE. When you pause the code (which breaks into the running process), what function is the CPU in?

The CPU is in the HardFault_Handler as @Community member​ suspected it would be

Where can i find these settings?

Check your compiler flags. Ensure you're compiling to the Thumb instruction set and not the ARM instruction set.

Are you talking about the -mthumb part?

This is the first line of the console when i build the project.

arm-none-eabi-gcc -mcpu=cortex-m4 -c -x assembler-with-cpp --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Startup/startup_stm32wb55rgvx.o" "../Startup/startup_stm32wb55rgvx.s"

Hm; that was what caused my problems when I first started into the world of STM32. You'll have to single-step through the disassembly and find the instruction on which the processor is hard faulting.

Righto, thanks for the help so far!