Black-Magic-Probe-Book icon indicating copy to clipboard operation
Black-Magic-Probe-Book copied to clipboard

BMDebug: DWARF error. Wrong version in compilation unit header (is 5, should be 2,3 or 4)

Open OevreFlataeker opened this issue 1 year ago • 3 comments

No sure, if that's the proper place to report this. I am using bmdebug.exe from this repo's releases and try to follow some examples with the Black-Magic-Probe book. When I try to load a Blink.ino.elf from Arduino IDE 2 with enabled debug symbold, bmdebug crashes after showing this message in the message pane:

BMDebug: DWARF error. Wrong version in compilation unit header (is 5, should be 2,3 or 4) (in module )

Is this something I need to change in the Arduino IDE or is this a matter against which version BMDebug.exe has been compiled against maybe?

OevreFlataeker avatar Jan 20 '24 17:01 OevreFlataeker

Blink2.ino.elf.zip Example Blink2.ino.elf.zip as a reference

OevreFlataeker avatar Jan 20 '24 17:01 OevreFlataeker

This message appears to come from GDB (BMDebug is a front-end for GDB, so error messages from GDB are shown in the console view). Check that BMDebug is using the correct GDB. In the configuration section (top right of the BMDebug interface), you can set the path to the GDB to use. Generally speaking, you should use the GDB that comes with the GCC compiler that you used to build the firmware with. It looks like GCC is a fairly recent version, but that the GDB launched by BMDebug is quite old.

compuphase avatar Jan 22 '24 11:01 compuphase

Thanks! Makes perfectly sense! Yes the ARM toolchain bundled with Arduino Studio is probably much newer than the GDB from the ARM toolchain I had on another path on my system! Will try!

OevreFlataeker avatar Jan 22 '24 13:01 OevreFlataeker