Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053B-page 76
 2012 Microchip Technology Inc.
Table 4-2 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.
For example, C source files (.c files) are first passed to the C preprocessor, CPP. The 
output of this application are .pre files. These files are then passed to the parser appli-
cation, P1, which produces a p-code file output with extension .p1. The applications 
are executed in the order specified and temporary files are used to pass the output of 
one application to the next.
The compiler can accept more than just C source files. Table 4-1 lists all the possible 
input file types, and these files can be seen in this diagram, on the top and bottom, 
being passed to different compilation applications. They are processed by these 
applications and then the application output joins the normal flow indicated in the 
diagram.
For example, assembly source files are passed straight to the assembler application
1
 
and are not processed at all by the code generator. The output of the assembler (an 
object file with .obj extension) is passed to the linker in the usual way. You can see 
that any p-code files (.p1 extension) or p-code libraries (.lpp extension) that are 
supplied on the command line are initially passed to the code generator.
Other examples of input files include object files (.obj extension) and object libraries 
(.lib extension), both of which are passed initially to the linker, and even HEX files 
(.hex extension), which are passed to one of the utility applications, called HEXMATE, 
which is run right at the end of the compilation sequence.
Some of the temporary files shown in this diagram are actually preserved and can be 
inspected after compilation has concluded. There are also driver options to request that 
the compilation sequence stop after a particular application and the output of that 
application becomes the final output.
TABLE 4-2:
COMPILER APPLICATION NAMES
Name
Description
xc8
 (calls PICC or PICC18) Command line driver; the interface to the compiler
CLIST
Text file formatter
CPP
The C preprocessor
P1
C code parser
CGPIC
 or CGPIC18
Code generator (based on the target device)
ASPIC
 or ASPIC18
Assembler (based on the target device)
HLINK
Linker
OBJTOHEX
Conversion utility to create HEX files
CROMWELL
Debug file converter
HEXMATE
HEX file utility
LIBR
Librarian
DUMP
Object file viewer
CREF
Cross reference utility
1. Assembly file will be preprocessed before being passed to the assembler if the
-P
 option is selected.