Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ELF, COFF, HEX & co - what are the differences?

Status
Not open for further replies.

ze_dib

Member level 5
Joined
Jan 6, 2003
Messages
80
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
France
Activity points
1,122
ELF, COFF, HEX & co

Hi

Could someone exlain me differences between ELF, COFF and hex files ?

What is S-record, which file format does it correspond to

Thank in advance

TOTO2001
 

ELF, COFF and HEX

Hi,

I can try to explain the meaning of each.

File .elf is generated by the linker when you're programming in C language, and it is used for debugging your code moving directly on
your C source code.
File .Hex is the programming file of your microcontroller, in which the operating code of your software is coded in hexadecimal format.
S-record is one of the formats in which the programming file can be coded.

I can find a brief description of S-record on the following address.


http://www.amelek.gda.pl/avr/uisp/srecord.htm
 

Hi,

The whole process goes like this:

1. When you compile and link your program, you get an executable file that packs your code and data into a specific format. ELF and COFF are only two of these formats. ELF is a little more complex and at the same time the most flexible and it is used mostly in the UN*X world, COFF is very powerful too, a little bit easier to work with (at least that's what I heard) and Micro$oft used a derivate of the format for the Windoze exe files. However, none of them is generally suitable to load directly into a microcontroller, unless you are running an OS on it. So generally after this you must get to the second step.
2. After you get your executable file you must upload it into the microcontroller. This step involves copying the sections you need from the ELF file (generally all code and data sections) into a format more suitable for uploading. HEX and SRecord are two of these formats. These are text files that augment the data with address and checksum information and split it into small chunks (lines). In this way the program is easily uploadable from any terminal program. Again HEX and SRecord are quite similar in functionality; some versions of SRecord contains more record types. You can get a tool that converts between the HEX format (for example SRecord, hxxp://ftp.tuwien.ac.at/softeng/Aegis/srecord.html)

HTH.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top