Why does STM32CubeIDE debugger always stop on HAL_Init()


I've noticed that while debugging an STM32 project using the STM32CubeIDE debugger, the debugger always stops on the HAL_Init() function call even when I don't have a breakpoint listed. This even occurs when I create a brand new project, which makes me think it's not something I'm accidentally doing in my project.

Is there a way to disable this?

enter image description here

Best Answer

Yes, there is a way to disable this default behaviour. Under the Debugger Icon (the "bug") > Debug Configurations > [STM32 C/C++ Application > Your debug configuration] > Startup there is a "Set breakpoint at: [function name, defaults to main]" checkbox, which you can simply turn off.

STM32 Cube IDE/Eclipse toolbar, with the debugger submenu open

"Debug Configurations" dialog