Skip to main content
ikassma
Associate III
May 31, 2023
Solved

How to Debug at custom Start Address in STM32CUBEIDE?

  • May 31, 2023
  • 2 replies
  • 4227 views

I am using stm32cubeide 1.12.1 version.

Debugging was attempted at the start address of the program, 0x08020000. The first download was completed and debugging was normally performed. However, if you press the reset button of stm32cubeide, the timer interrupt without a source continues to operate and is not normally executed.

If you change the start address of the program to 0x08000000, everything works normally.

Is there any other way to use the reset button of stm32cubeide normally at the start address of a randomly designated program?

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

Very simple, just put the start address (or vectors address) in the debugger settings-> startup.

But after the reset the ST debugger won't automatically jump to the same start address again.

You have to break on the reset event and go the start address manually.

(other debuggers such as IAR behave differently)

Or you can burn a simple "bootloader" at 0x08000000 which just jumps to your app start address.

2 replies

Pavel A.
Pavel A.Best answer
May 31, 2023

Very simple, just put the start address (or vectors address) in the debugger settings-> startup.

But after the reset the ST debugger won't automatically jump to the same start address again.

You have to break on the reset event and go the start address manually.

(other debuggers such as IAR behave differently)

Or you can burn a simple "bootloader" at 0x08000000 which just jumps to your app start address.

ikassma
ikassmaAuthor
Associate III
May 31, 2023

How to set start address manually at reset event?

Pavel A.
June 1, 2023

Uncheck "resume" in debug settings-> startup.

When the debugger stops at the CPU reset, find the desired start address in disassembly and "move" to it, or change the PC register in Registers view.

RetroInTheShade
Associate
May 31, 2023

As an alternative, you can create a debug profile which excludes build and load… not as fast as reset but close.