2021-11-21 10:31 PM
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.
2021-11-22 02:50 AM
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.
2021-11-22 03:08 AM
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.
2021-11-22 03:39 AM
@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.
2021-11-22 07:34 AM
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.