cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a bin file with a start address in stm32cubeIDE. Also, how to debug App in a project with separate Boot and App?

MYMM
Associate

I am using an STM32 system with separate bootloader and application parts implemented. This time I want to modify and debug the application part, but I don't know how to achieve that in STM32CubeIDE.

I would appreciate your advice.

*The path of gdb and gcc is working.​

4 REPLIES 4
Markus GIRDLAND
ST Employee

Hello there!

There is some information regarding this in the STM32CubeIDE user guide. Perhaps that can be a good point to start.

If you still run into issues then please give some additional information about the problem.

simosilva
Senior

I cannot give advice on STM32CubeIDE unfortunately since I use keil, but if nothing's changed on the st boot phase the firmware placed into the first address of the flash is the first running and must be your bootloader.

Then if there is a proper jump to the application part, you simply have to run in debug mode, the part done by the boot simply is "hidden" as you're running a reset longer than normal, then after the jump to the application you have to see just the debugger running without problems.

If this is not the case and aplication have troubles, something on the jump is miss or broke.

Debugger works referencing lines of code to the corrisponding memory addresses, so when a line of the application you want to debug is correctly reached on the MCU, the debugger will be notified.

@MYMM​ also check if the linker script is writting your code in flash starting at the address you are expecting.

Extra thing:

Sometimes stm32ide tries to start a debugg sesion with my "release" code build, thats never going to work (no .elf file is created!) so i need to change manually to debug with the "debug" code build.

TDK
Guru

There is a download offset you can specify within the run/debug configuration. It's going to be a lot more straightforward to stick with ELF or HEX files for this application.

0693W00000GYSpTQAX.png

If you feel a post has answered your question, please click "Accept as Solution".