how to convert .c file to .hex file and load it on AVR microcontroller?

2.1k views Asked by At

I need a compiler to convert .c files to .hex file in command line and I need information about how its work thanks a lot

1

There are 1 answers

1
Jonathon S. On

It depends on what the target is for your application. If this is being loaded onto a microprocessor, which is why I am assuming you need a hex file, you will need to download the compiler for the microprocessor. This can probably be obtained on the chip manufacturer website. Once you acquire this you will need to compile, link and map your project, which will result in some sort of output file such as a combined-object file format (COFF) file. For the microprocessor I am using, the manufacturer also provides a converter that converts the COFF file to hex format. The hex file can then be used to load the firmware on to a chip.