I use embedded system. After the C source code building I get many files. The file name is the same, but the extension is different:
.s37 .elf .hex .sig
What is the differences between them? Mainly what is the differences between .s37 and .elf?
Those are just different executable formats.
.s37 is one variant of SREC format, it's ascii/line fixed text including hex (binary)
This format is well known by flash/upload software in most embedded targets.
.elf
is an executable & linkable file, product of a linker like gcc
or other commercial compilers (Windriver, CodeWarrior...).
.elf
format is hardly uploadable on embedded targets without conversion to .SREC
with objcopy
first.
One of the main differences in contents is that .elf
format can contain debugging symbols, whereas .srec/.s37
cannot.
My guess is that your toolchain does it all: link: .elf, then objcopy to convert .elf to .s3 for target upload (losing symbol information if any, which requires you to keep the .elf
file handy when debugging your application on the target, the SREC file contains only code & data, no debug).
S3 format can't contain symbols. They're discarded, even using a simple objcopy
command. That format is only useful to contain code/data to upload on a target.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With