2022-04-17 12:43 AM
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?
2022-04-17 02:31 AM
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.
2022-04-17 05:16 AM
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
2022-04-17 06:39 AM
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.