What is the difference between BIN file and ELF file?

I notice that the local compiler generates multiple files: .BIN and .ELF. What is the difference between these two?

Usually I use “particle flash --usb XXX.bin”, but it seems Particle Workbench uses .ELF file for flashing. What is the real difference?

Thanks.

The .bin files are a Particle software binary, packaged to be flashed to a device. There’s a header and a CRC to validate the binary.

The .elf files (Executable Linkable Format) are a product of building. They’re eventually translated into what becomes the .bin file by the linker.

Workbench doesn’t directly flash the device with .elf files, but it does use the .elf files for debugging because they contain the location of the symbols in memory so addresses can be mapped into readable symbols.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.