Skip to main content
DiBosco
Senior
October 21, 2021
Solved

Cube IDE: Running, and being able to reset and re-run, a program from 0x8008000 (ie offset from where a bootloader would live)

  • October 21, 2021
  • 3 replies
  • 2181 views

If I have a bootloader that resides at 0x8000000 and the main program starts at 0x8008000 I can load it with the debugger and all is fine. I can run it in standa alone mode with the bootloader jumping to it as well. However, if I try to restart and rerun the program with the debugger it doesn't work and I have to reprogram. Is there a way to set up the debugger so that I don't have reprogram each time please?

FWIW doing this on a L476.

Thanks!

Best answer by DiBosco

Hi, thanks for the reply. I should really have said that I'd already tried that to no avail.

A colleague came up with the idea of putting;

set $pc=Reset_Handler

In Restart Configurations. That seems to work and is surprisingly, not ephemeral.

3 replies

Guillaume K
ST Employee
October 21, 2021

Hello

In STM32CubeIDE 1.7.0, when you create a debug configuration for "STM32 Cortex-M C/C++ Application" there is a Startup tab. In "Runtime options": try to set start address 0x08008000 in "Set program counter (hex) :" or "Specify vector table (hex):" (if you have moved the Interrupt vector table to 0x08008000).

DiBosco
DiBoscoAuthorBest answer
Senior
October 21, 2021

Hi, thanks for the reply. I should really have said that I'd already tried that to no avail.

A colleague came up with the idea of putting;

set $pc=Reset_Handler

In Restart Configurations. That seems to work and is surprisingly, not ephemeral.

Adrian Adamson
Senior
January 31, 2025

Thanks!  I had the same problem and it had me discouraged for about a week.  This seems to have fixed it right away.

Adrian Adamson
Senior
October 1, 2025

I ran into the same problem years later, and the same fix worked again.   But it took me a long time to find the "Restart Configurations," so if you see this and you're looking for it, it's a drop-down menu within the reset button in the debug view.