ELF with source code - how to generate

PlatformIO used to generate ELF files with the source code in it. The ones I generated today for the LPC1768 and the DUE don’t have the source code included.

How do i get that back?

Please eloborate on how the ELF file “has source code” in it. Can you show an example of what you mean? ELF files are executable images, they contain the machine code (.text) and other constant data and objects. There is no C/C++ source code text inside them (well, the compiled version of them). Or are you talking about debug symbols which your debugger may use to find the source code line? Or do you mean the assembly code for the ELF file?

Here’s one with the debugging info in it.
https://www.dropbox.com/s/l70svv3x2nu69xa/firmware.elf.with_source.zip?dl=0

Here’s one without.
https://www.dropbox.com/s/gqeodx8zrc5w1d3/firmware.elf.without_source.zip?dl=0

Have you tried adding the line build_flags = -g -ggdb to your platformio.ini?

1 Like

PERFECT!!!

Thanks for the help. It’s much appreciated.