# Vault 7: Projects

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

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 81
- 82
- 83
- 84
- 85
…
- 365
- 366

Compiler Command-Line Driver
 2012-2013 Microchip Technology Inc. DS50002071C-page 83
5.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; refer to
Section 5.7.8 Options for Assembling or Section 5.7.9 Options for Linking for
information on specifying options for these tools to the compiler.
 Options Specific to 16-Bit Devices
 Options for Controlling the Kind of Output
 Options for Controlling the C Dialect
 Options for Controlling Warnings and Errors
 Options for Debugging
 Options for Controlling Optimization
 Options for Controlling the Preprocessor
 Options for Assembling
 Options for Linking
 Options for Directory Search
 Options for Code Generation Conventions
5.7.1 Options Specific to 16-Bit Devices
For more information on the memory models, see Section 10.12 Memory Models.
TABLE 5-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.

- 1
- 2
…
- 81
- 82
- 83
- 84
- 85
…
- 365
- 366