5.5.1 Output Files
The compilation driver can produce output files with the following extensions, which are case-sensitive.
Extensions | Definition |
---|---|
file.hex | Intel HEX executable file |
file.elf (a.out) | ELF debug file |
file.o | Object file (intermediate file) |
file.s | Assembly code file (intermediate file) |
file.i | Preprocessed C file (intermediate file) |
file.ii | Preprocessed C++ file (intermediate file) |
file.map | Map file |
The names of many output files use the same base name as the source file from which they were derived. For example the source file input.c
will create an object file called input.o
.
If no -o
option is given to rename the final output, the compiler writes to a file called a.out. This is an ELF file. Typically, ELF files are manually assigned a .elf extension.
If you are using an IDE, such as MPLAB X IDE, to specify options to the compiler, there is typically a project file that is created for each application. The name of this project is used as the base name for project-wide output files, unless otherwise specified by the user. However check the manual for the IDE you are using for more details.
The compiler is able to directly produce a number of the output file formats which are used by Microchip development tools.
The default behavior of xc32-gcc
and xc32-g++
is to produce an ELF output. To make changes to the file’s output or the file names, see
5.7 Driver Option Descriptions.