cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE debugging without flashing (suppressing load of .elf)

chriskuku
Senior II

My problem: for debugging it is obvious that the .ELF file is necessary to be loaded and flashed. But normally my binary (.bin) file also contains information at the end of the .text area that the .elf file does not know about. Otherwise the code part of the BIN file is idenditcal to the .ELF-file.

So if I could, say, flash the chip with the BIN file and debug it with the information from the .ELF-file in the IDE without toucing the already loaded/flashed BIN-file, I'd be happy.

Is there a way to achieve this?

3 REPLIES 3
Pavel A.
Evangelist III

CubeIDE debugger cannot load .bin files as they lack the address information.

Either convert the .bin to .hex or load it manually, then debug without loading.

chriskuku
Senior II

In the debug configuration pane are two tic buttons, download and „Load symbols“

I unticked „Download“ and left symbols ticked, since I thought I need symbols for debugging but somehow it didn‘t seem to work.

The flashed binary got overwritten, at least it seems so.

Christoph

TDK
Guru

To debug your program without downloading it:

Go to Debug Configurations... -> Startup -> select load image -> Edit... -> uncheck Download

Assuming the ELF/BIN are compatible, that will work.

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