Vault 7: Projects

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

Compiler Command-Line Driver
2012-2013 Microchip Technology Inc. DS50002071C-page 85
5.7.2 Options for Controlling the Kind of Output
The following options control the kind of output produced by the compiler.
-msmall-data Compile using the small data model. All static and external variables
are assumed to be located in the lower 8 KB of data memory space.
(This is the default.)
-msmall-scalar Like -msmall-data, except that only static and external scalars are
assumed to be in the lower 8 KB of data memory space. (This is the
default.)
-mtext=name Specifying -mtext=name will cause text (program code) to be placed
in a section named name rather than the default .text section. No
white spaces should appear around the =.
-mauxflash Place all code from the current translation unit into auxiliary FLASH.
This option is only available on devices that have auxiliary FLASH.
-msmart-io
[=0|1|2]
This option attempts to statically analyze format strings passed to
printf, scanf and the f and v variations of these functions. Uses of
nonfloating point format arguments will be converted to use an
integer-only variation of the library functions.
-msmart-io=0 disables this option, while -msmart-io=2 causes the
compiler to be optimistic and convert function calls with variable or
unknown format arguments. -msmart-io=1 is the default and will
only convert the literal values it can prove.
TABLE 5-6: KIND-OF-OUTPUT CONTROL OPTIONS
Option Definition
-c Compile or assemble the source files, but do not link. The default file extension
is .o.
-E Stop after the preprocessing stage, i.e., before running the compiler proper. The
default output file is stdout.
-o file Place the output in file.
-S Stop after compilation proper (i.e., before invoking the assembler). The default
output file extension is .s.
-v Print the commands executed during each stage of compilation.
TABLE 5-5: 16-BIT DEVICE-SPECIFIC OPTIONS (CONTINUED)
Option Definition
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.

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh