Microchip Technology SW006022-2N Data Sheet

Page of 338
MPLAB
®
 XC16 C Compiler User’s Guide
DS52071B-page 60
 2012 Microchip Technology Inc.
3.7
DRIVER OPTION DESCRIPTIONS
The compiler has many options for controlling compilation, all of which are 
case-sensitive. They have been grouped, as shown below, according to their function. 
Remember, these are options for the command-line driver; options for the linker, 
assembler or any other application can be found in the MPLAB Assembler, Linker and 
Utilities for PIC24 MCUs and dsPIC DSCs User’s Guide (DS51317)
.
3.7.1
Options Specific to 16-Bit Devices
For more information on the memory models, see Section 7.12 “Memory Models”
TABLE 3-5:
16-BIT DEVICE-SPECIFIC OPTIONS
Option
Definition
-mconst-in-code
Put const qualified variables in the auto_psv space. The compiler 
will access these variables using the PSV window. (This is the 
default.)
-mconst-in-data
Put const qualified variables in the data memory space.
-mconst-in-
auxflash
When combined with -mconst-in-code, put call const qualified file 
scope variables into auxiliary FLASH. All modules with auxiliary FLASH 
should be compiled with this option; otherwise a link error may occur.
-merrata=
id[,id]*
This option enables specific errata work arounds identified by id. Valid 
values for id change from time to time and may not be required for a 
particular variant. An id of list will display the currently supported 
errata identifiers along with a brief description of the errata. An id of 
all
 will enable all currently supported errata work arounds.
-mfillupper
Specify the upper byte of variables stored into space(prog) sections. 
The fillupper attribute will perform the same function on individual 
variables.
Note 1:
The procedure abstractor behaves as the inverse of inlining functions. The pass is 
designed to extract common code sequences from multiple sites throughout a 
translation unit and place them into a common area of code. Although this option 
generally does not improve the run-time performance of the generated code, it can 
reduce the code size significantly. Programs compiled with -mpa can be harder to 
debug; it is not recommended that this option be used while debugging using the 
COFF object format.
The procedure abstractor is invoked as a separate phase of compilation, after the 
production of an assembly file. This phase does not optimize across translation 
units. When the procedure-optimizing phase is enabled, inline assembly code must 
be limited to valid machine instructions. Invalid machine instructions or instruction 
sequences, or assembler directives (sectioning directives, macros, include files, 
etc.) must not be used, or the procedure abstraction phase will fail, inhibiting the 
creation of an output file.