4.4.1 Output Files
The common output file types and case-sensitive extensions are shown in Table 3-2.
Extension | File Type | How created |
---|---|---|
.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 4.6.2.3 O: Specify Output File), the base names of these files will
be the project name.
The default output can be changed by
using the -gcoff
option, which generates a COFF file (described in 4.6.5.2 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 other formats, such as COFF. Some aspects of the project’s operation might not even be available to your debugger when using COFF. Development environments 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 a file called input.p1
when the -c
option is used.