The common output file types and case-sensitive extensions are shown in Table 3-2.
Extension | File Type | How created |
---|---|---|
file.elf |
ELF (Executable and Linkable Format) with Dwarf debugging information | -o option |
.cof |
COFF (Common Object File Format) | -gcoff option |
.p1 |
P-code file (Intermediate file) | -c
|
.s |
Assembly file | -S option |
.i |
Preprocessed C file | -E and -o option |
The default behavior of
is to produce an ELF and Intel HEX
output. Unless changed by the xc8-cc
-o
option (see O: Specify Output File), the base names of these files will
be the project name.
This behavior can be
changed by using the -gcoff
option, which generate a COFF file (described
in G: Produce Debugging Information Option).
The ELF/DWARF file is used by debuggers to obtain debugging information about the project and allows for more accurate debugging compared to the COFF format. Some aspects of the project’s operation might not even be available to your debugger when using COFF. The MPLAB X IDE will typically request the compiler to produce an ELF 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.p1
when the -c
option is used.