Skip to main content
AAlex.8
Associate II
September 29, 2021
Question

No startup script in CubeIDE?

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?

This topic has been closed for replies.

3 replies

KnarfB
Super User
September 29, 2021

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

hth

KnarfB

AAlex.8
AAlex.8Author
Associate II
September 30, 2021

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

Pavel A.
September 30, 2021

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)