cancel
Showing results for 
Search instead for 
Did you mean: 

Freertos debug from a different address with cubeide

GZazz.1
Associate

Hi,

I'm developing an application with freertos that starts from the address 0x08004000 instead of the standard 0x08000000, because at the start address I have a bootloader but I'm not able to debug the application. I changed the VTOR offset to 0x4000 in the startup file generated by the internal cubeMX, and I also added the following line in: startup - "Initialization Commands" of the debug configuration

set *0xe000ed08 = 0x4000
 
set $sp = *(unsigned int*)0x4000
 
set $pc = *(unsigned int*)0x4004
 
tbreak main

​I'm using jlink or in alternative stlink_v2 but nothing changes. The code is loaded always from address 0x08000000.

Someone could help me? These settings are enough to debug a freertos application?

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

set $sp = *(0x08000000 + 0x4000)

set $pc = *(0x08000000 + 0x4004)

View solution in original post

2 REPLIES 2
Pavel A.
Evangelist III

set $sp = *(0x08000000 + 0x4000)

set $pc = *(0x08000000 + 0x4004)

thanks a lot, it's correct.