I’m debugging a trivial LED blinker program on the STM32F030F4P6 device, using a NUCLEO-F030R8 board for the ST-LINK/V2-1 interface, on a Windows 10 machine. The basic debugging process is working fine, except it seems that the reset handler is not being executed when run via the debugger.
If I press the reset button on the STM32F030F4P6 demo board, the application starts and blinks the LED properly. The program uses the SysTick timer interrupt to toggle the LED state. If I try to step through the code using the debugger, the SysTick interrupt handler is never invoked.
I’m using my own reset handler code, which sets up the progam environment, initializes the .data segment and clears the .bss segment. Additionally, it configures the SysTick to generate an interrupt twice a second. Again, all this works if I power-cycle the board or hit the hardware reset button.
When stepping through the code using the debugger, the SysTick peripheral is not properly configured (or not configured at all). If I try to have the debugger halt at the reset handler instead of main, it seemingly ignores this and continues to break at main().
If I put the SysTick initialization code within the main() function, instead of the reset() function, everything works as you would expect.
My questions are: 1) Why will the debugger not allow me to step through the reset handler, and 2) why does the debugger seems to skip over the reset handler while debugging?
Your help is appreciated.