# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 74
- 75
- 76
- 77
- 78
…
- 365
- 366

MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 76  2012-2013 Microchip Technology Inc.
A source file is a file that contains all or part of a program. Source files are initially
passed to the preprocessor by the driver.
A module is the output of the preprocessor, for a given source file, after inclusion of any
header files (or other source files) which are specified by #include preprocessor
directives. These modules are then passed to the remainder of the compiler applica-
tions. Thus, a module may consist of several source and header files. A module is also
often referred to as a translation unit. These terms can also be applied to assembly
files, as they too can include other header and source files.
5.3 THE COMPILATION SEQUENCE
How the compiler operates with other applications and how to perform different types
of compilations is discussed in the following sections.
5.3.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 or MPLAB IDE v8,
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 Section 3.4 MPLAB X IDE Projects.
The driver program will call the required internal compiler applications. These applica-
tions are shown as the smaller boxes inside the large driver box. The temporary file pro-
duced by each application can also be seen in this diagram.
Table 5-3 lists the compiler applications. The names shown are the names of the exe-
cutables, which can be found in the bin directory under the compilers installation
directory. Your PATH environment variable should include this directory.
TABLE 5-3: COMPILER APPLICATION NAMES
Name Description
xc16-gcc Command line driver; the interface to the compiler
xc16-as Assembler (based on the target device)
xc16-ld Linker
xc16-bin2hex Conversion utility to create HEX files
xc16-strings String extractor utility
xc16-strip
Symbol stripper utility
xc16-nm
Symbol list utility
xc16-ar Archiver/Librarian
xc16-objdump Object file display utility
xc16-ranlib Archive indexer utility

- 1
- 2
…
- 74
- 75
- 76
- 77
- 78
…
- 365
- 366