cancel
Showing results for 
Search instead for 
Did you mean: 

No startup script in CubeIDE?

AAlex.8
Associate II

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?

3 REPLIES 3
KnarfB
Principal III

The STM32CubeIDE user guide (UM2609) has an example in "2.8.7 Debugging position-independent code".

hth

KnarfB

AAlex.8
Associate II

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.0693W00000FB04pQAD.png

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)