2021-09-29 05:32 AM
Hi all,
Have switched to the CubeIDE from Atollic. I'm curious about the absence of the startup script (the one with gdb commands) in the CubeIDE. In my project I got a bootloader at the FLASH start and before debugging in Atollic I place these gdb commands in the script:
"
# Reconfigure vector table offset register to match the application location
set *0xe000ed08 = 0x20000
# Get the application stack pointer (First entry in the application vector table)
set $sp = *(unsigned int*)0x20000
# Get the application entry point (Second entry in the application vector table)
set $pc = *(unsigned int*)0x20004
"
So the debugger knows that the location ResetHandler is shifted.
My question is why the debugging session in CubeIDE goes with no problem even when I use the default settings and there's no startup script at all?
2021-09-29 10:52 AM
The STM32CubeIDE user guide (UM2609) has an example in "2.8.7 Debugging position-independent code".
hth
KnarfB
2021-09-30 12:36 AM
Hi @KnarfB,
Thanks for the response!
Yes, the manual states the procedure to write offsets, but you see, I haven't change anything in the "Debug configurations", but I can say for sure that the execution starts right at the shifted ResetHandler.
2021-09-30 09:40 AM
So, the debugger of CubeIDE got some smartness since Atollic. There's a progress.
(Hint: ResetHandler usually is marked as the program entry point in the linker script)