User manual

XC8 Command-line Driver
2012 Microchip Technology Inc. DS52053B-page 113
Note that the code that clears or initializes variables, which is included by default, will
clobber the contents of the STATUS register. For mid-range and baseline devices, if
you need to check the cause of Reset using the TO or PD bits in this register, then you
must enable the resetbits suboption as well. See 5.10.1.4 “STATUS Register
Preservation” for how this feature is used. The usable suboptions include those
shown in Table 4-15.
See Section 4.9 “MPLAB IDE V8 Universal Toolsuite Equivalents” or
Section 4.10 “MPLAB X Universal Toolsuite Equivalents” for use of this option in
MPLAB IDE.
TABLE 4-15: RUNTIME ENVIRONMENT SUBOPTIONS
Suboption Controls On (+) Implies
Default
State
init The code present in the main
program module that copies
the ROM-image of initial val-
ues to RAM variables.
The ROM image is copied into
RAM and initialized variables will
contain their initial value at
main().
On
clib The inclusion of library files
into the output code by the
linker.
Library files are linked into the
output.
On
clear The code present in the main
program module that clears
uninitialized variables.
Uninitialized variables are cleared
and will contain 0 at main().
On
config Programming the device with
default config bytes
Configuration bits not specified will
be assigned a default value.
(PIC18 only)
Off
download Conditioning of the Intel HEX
file for use with bootloaders.
Data records in the Intel HEX file
are padded out to 16 byte lengths
and will align on 16 byte boundar-
ies. Startup code will not assume
Reset values in certain registers.
Off
no_startup Whether the startup module is
linked in with user-defined
code.
Startup module will not be linked
in.
Off
osccal Initialize the oscillator with the
oscillator constant.
Oscillator will be calibrated.
(PIC10/12/16 only)
On
oscval:
value
Set the internal clock oscilla-
tor calibration value.
Oscillator will be calibrated with
value supplied. (PIC10/12/16
only)
Not
specified
keep Whether the start-up module
source file (startup.as) is
deleted after compilation.
The start-up module is not deleted. On
plib Whether the peripheral library
is linked in.
The peripheral library will be linked
in to the build. (PIC18 only)
On
resetbits Preserve Power-down and
Time-out STATUS bits at start
up.
STATUS bits are preserved.
(PIC10/12/16 only)
Off
stackcall Allow function calls to use a
table look-up method once
the hardware stack has filled.
Functions called via CALL instruc-
tion while stack not exhausted,
then called via a look-up table.
(PIC10/12/16 devices only.)
Off