User manual

MPLAB
®
XC8 C Compiler User’s Guide
DS52053B-page 60 2012 Microchip Technology Inc.
3.6 UNDERSTANDING THE COMPILATION PROCESS
This section tells you how to find out what the compiler did during the build process,
how it encoded output code, where it placed objects, etc. It also discusses the features
that are supported by the compiler.
What’s the Difference Between the Free, Standard and PRO Modes?
How Can I Make My Code Smaller?
How Can I Reduce RAM Usage?
How Can I Make My Code Faster?
How Does the Compiler Place Everything in Memory?
How Can I Make My Interrupt Routine Faster?
How Big Can C Variables Be?
What Optimizations Will Be Applied to My Code?
How Do I Utilize All the RAM Banks on My Device?
How Do I Utilize the Linear Memory on Enhanced Mid-range PIC Devices?
What Devices are Supported by the Compiler?
How Do I Know What Code the Compiler Is Producing?
How Do I Find Out What an Warning/error Message Means?
How Can I Tell How Big a Function Is?
How Do I Know What Resources Are Being Used by Each Function?
How Do I Find Out Where Variables and Functions Have Been Positioned?
Why are some objects positioned into memory that I reserved?
How Do I Know How Much Memory Is Still Available?
How Do I Build Libraries?
What is Different About an MPLAB IDE Debug Build?
How Do I Stop An Unused Function Being Removed?
How Do I Use Library Files In My Project?
What Optimizations Are Employed By The Compiler?
3.6.1 What’s the Difference Between the Free, Standard and PRO
Modes?
These modes (see Section 1.2 “Compiler Description and Documentation”) mainly
differ in the optimizations that are performed when compiling. Compilers operating in
Free (formerly called Lite) and Standard mode can compile for all the same devices as
supported by the Pro mode. The code compiled in Free and Standard mode can use
all the available memory for the selected device. What will be different is the size and
speed of the generated compiler output. Free mode output will be much less efficient
when compared to that produced in Standard mode, which in turn will be less efficient
than that produce when in Pro mode.
All these modes use the OCG compiler framework, so the entire C program is compiled
in one step and the source code does not need many non-standard extensions.
There are a small number of command-line options disabled in Free mode, but these
do not relate to code features; merely how the compiler can be executed. Most custom-
ers never need to use these options. The options are --GETOPTION Section 4.8.32
“--GETOPTION: Get Command-line Options” and --SETOPTION Section 4.8.53
“--SETOPTION: Set the Command-line Options For Application”.