Embedded – What is the common structure of firmware files?

I have a total of n00b in embedded programming. Suppose I am using a compiler to build the firmware. The result of this operation is a file that will flash to (I guess) the MCU (such as ARM or AVR) flash memory.

My question is: What common structure (if any) is used for such generated files containing firmware?

I come from desktop development, I understand, for example, for Windows, the compiler is likely to generate PE or PE, and for Unix-like systems I may get ELF and COFF, but I don’t know the embedded system.

I also understand that this largely depends on many factors (compiler, ISA, MCU vendor, operating system, etc.), so I can at least give an example.

Update: I will Vote all answers to provide examples of using structure, and I will choose the one that I think is best to investigate the existing technology.

Most tools output ELF or COFF, or similar things, which can ultimately be attributed to HEX/bin files.

However, this is not necessarily what your goal wants to see. Each vendor has its own “firmware” file format. Sometimes they are encrypted and signed, sometimes plain text. Sometimes there is compression, sometimes it is original. It may be a simple file, or something complex, It’s not just your program.

An integral part of embedded work is the build process and system startup/startup process, as well as putting code on the component. Don’t underestimate this effort.

< /div>

I have a total of n00b in embedded programming. Suppose I am using a compiler to build the firmware. The result of this operation is a file that will flash to (I guess) the MCU (e.g. ARM or AVR) ) In the flash memory.

My question is: What common structures (if any) are used for such generated files containing firmware?

I come from desktop development, I understand, for example, for Windows, the compiler is likely to generate PE or PE, and for Unix-like systems I may get ELF and COFF, but I don’t know the embedded system.

I also understand that this largely depends on many factors (compiler, ISA, MCU vendor, operating system, etc.), so I can at least give an example.

Update: I will Vote all answers to provide examples of using structures, and I will choose the one that I think is best to investigate the existing technology.

Most tools output ELF or COFF, or Similar things can ultimately be attributed to HEX/bin files.

However, this is not necessarily what your goal wants to see. Each vendor has its own “firmware” file format Sometimes they are encrypted and signed, sometimes plain text. Sometimes there is compression, sometimes it is original. It may be a simple file, or something complicated, not just your program.

< p>An integral part of embedded work is the build process and system startup/startup process, as well as putting code on the components. Don’t underestimate this effort.

Leave a Comment

Your email address will not be published.