7.2.1 The Compiler Applications

The MPLAB XC16 C Compiler compiles C source files, producing assembly language files. These compiler-generated files are assembled and linked with other object files and libraries to produce the final application program in executable ELF or COFF file format. The ELF or COFF file can be loaded into the MPLAB X IDE, where it can be tested and debugged, or the conversion utility can be used to convert the ELF or COFF file to Intel® hex format, suitable for loading into the command-line simulator or a device programmer. A software development tools data flow diagram is shown in the MPLAB X IDE Projects section.

The driver program will call the required internal compiler applications. These applications are shown as the smaller boxes inside the large driver box. The temporary file produced by each application can also be seen in this diagram.

The following table lists the compiler applications. The names shown are the names of the executables, which can be found in the bin directory under the compiler’s installation directory. Your PATH environment variable should include this directory.

Table 7-3. Compiler Application Names
NameDescription
xc16-gccCommand line driver; the interface to the compiler
xc16-asAssembler (based on the target device)
xc16-ldLinker
xc16-bin2hexConversion utility to create HEX files
xc16-stringsString extractor utility
xc16-stripSymbol stripper utility
xc16-nmSymbol list utility
xc16-arArchiver/Librarian
xc16-objdumpObject file display utility
xc16-ranlibArchive indexer utility