Skip to main content
GZazz.1
Associate
March 16, 2020
Solved

Freertos debug from a different address with cubeide

  • March 16, 2020
  • 1 reply
  • 871 views

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

This topic has been closed for replies.
Best answer by Pavel A.

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

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

1 reply

Pavel A.
Pavel A.Answer
Super User
March 16, 2020

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

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

GZazz.1
GZazz.1Author
Associate
March 17, 2020

thanks a lot, it's correct.