# Vault 7: Projects

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

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 54
- 55
- 56
- 57
- 58
…
- 365
- 366

MPLAB
®
XC16 C Compiler Users Guide
DS50002071C-page 56  2012-2013 Microchip Technology Inc.
A subset of command-line options may be specified in MPLAB X IDE. Select a cate-
gory, and then set up linker options. For additional options, see MPLAB Object Linker
for 16-Bit Devices documentation. See also Options Page Features.
TABLE 3-8: GENERAL CATEGORY
Option Description Command Line
Heap Size (bytes) Specify the size of the heap in bytes. Allocate a run-time
heap of size bytes for use by C programs. The heap is
allocated from unused data memory. If not enough mem-
ory is available, an error is reported.
--heap size
Stack Size (bytes) Specify the minimum size of the stack in bytes. By
default, the linker allocates all unused data memory for
the run-time stack. Alternatively, the programmer may
allocate the stack by declaring two global symbols:
__SP_init and __SPLIM_init. Use this option to
ensure that at least a minimum sized stack is available.
The actual stack size is reported in the link map output
file. If the minimum size is not available, an error is
reported.
--stack size
Allow overlapped
sections
Check to not check section addresses for overlaps.
Uncheck to check for overlaps.
--check-sections
--no-check-sections
Initialize data sections Check to support initialized data.
Uncheck to not support.
--data-init
--no-data-init
Pack data template Check to pack initial data values.
Uncheck to not pack.
--pack-data
--no-pack-data
Create handles Check to support far code pointers.
Uncheck to not support.
--handles
--no-handles
Create default ISR Check to create an interrupt function for unused vectors.
Uncheck to not create a default ISR.
--isr
--no-isr
Remove unused sections Check to not enable garbage collection of unused input
sections (on some targets).
Uncheck to enable garbage collection.
--no-gc-sections
--gc-sections
Fill value for upper byte
of data
Enter a fill value for upper byte of data. Use this value as
the upper byte (bits 16-23) when encoding data into pro-
gram memory. This option affects the encoding of sec-
tions created with the psv or eedata attribute, as well as
the data initialization template if the --no-pack-data
option is enabled.
--fill-upper=value
Stack guardband size Enter a stack guardband size to ensure that enough stack
space is available to process a stack overflow exception.
--stackguard=size
Additional driver options Type here any additional driver options not existing in this
GUI otherwise. The string you introduce here will be emit-
ted as is in the driver invocation command.
TABLE 3-9: SYMBOLS AND MACROS CATEGORY
Option Description Command Line
Linker symbols Create a global symbol in the output file containing the
absolute address (expr). You may use this option as
many times as necessary to define multiple symbols in
the command line. A limited form of arithmetic is sup-
ported for the expr in this context: you may give a hexa-
decimal constant or the name of an existing symbol, or
use + and - to add or subtract hexadecimal constants or
symbols.
--defsym=sym
Define Linker macros Add linker macros. -Dmacro

- 1
- 2
…
- 54
- 55
- 56
- 57
- 58
…
- 365
- 366