Microchip Technology SW006022-2N Data Sheet

Page of 338
MPLAB
®
 XC16 C Compiler User’s Guide
DS52071B-page 52
 2012 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.
3.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.
3.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 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. See Figure 3-1 for an overview of the software development data flow.