Skip to main content
chriskuku
Senior II
April 17, 2022
Question

STM32CubeIDE debugging without flashing (suppressing load of .elf)

  • April 17, 2022
  • 3 replies
  • 3869 views

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?

This topic has been closed for replies.

3 replies

Pavel A.
April 17, 2022

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
chriskukuAuthor
Senior II
April 17, 2022

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
April 17, 2022

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""."