Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 ユーザーズマニュアル

製品コード
SW006021-1
ページ / 518
XC8 Command-line Driver
 2012 Microchip Technology Inc.
DS52053B-page 91
4.7
XC8 DRIVER OPTIONS
This section looks at the general form of xc8 command-line options and what action 
the compiler will perform if no option is specified for a certain feature.
4.7.0.1
GENERAL OPTION FORMATS
All single letter options are identified by a leading dash character, “-”, for example: -C. 
Some single letter options specify an additional data field which follows the option 
name immediately and without any whitespace, for example: -Ddebug. In this manual, 
options are written in upper case and suboptions are in lower case.
Multi-letter, or word, options have two leading dash characters, for example: 
--ASMLIST
. (Because of the double dash, the driver can determine that the option 
--DOUBLE
, for example, is not a -D option followed by the argument OUBLE.)
Some of these word options use suboptions which typically appear as a comma-sepa-
rated list following an equal character, =, for example: --OUTPUT=hex,cof. The exact 
format of the options varies and are described in detail in the following sections.
Some commonly used suboptions include default, which represent the default spec-
ification that would be used if this option was absent altogether; all, which indicates 
that all the available suboptions should be enabled as if they had each been listed; and 
none
, which indicates that all suboptions should be disabled. For example:
--OPT=none
will turn off all optimizers.
Some suboptions may be prefixed with a plus character, +, to indicate that they are in 
addition to the other suboptions present, or a minus character “-”, to indicate that they 
should be excluded. For example:
--OPT=default,-asm
indicates that the default optimization be used, but that the assembler optimizer should 
be disabled. If the first character after the equal sign is + or -, then the default keyword 
is implied. For example: 
--OPT=-asm
is the same as the previous example.
See the –-HELP option, Section 4.8.33 “--HELP: Display Help”, for more information 
about options and suboptions.
4.7.1
Default Options
If you run the compiler driver from the command line and do not specify the option for 
a feature, it will default to a certain state. You can also specify the default suboption 
to double-dash options which will also invoke the default behavior. You can check what 
the default behavior is by using the --HELP=option on the command line, see 
4.8.33 “--HELP: Display Help”.
If you are compiling from within the MPLAB X IDE, it will, by default, issue explicit 
options to the compiler (unless changed in the Project Properties dialog), and these 
options may be different to those that are the default on the command line. For exam-
ple, unless you specify the --ASMLIST option on the command line, the default oper-
ation of the compiler is to not produce an assembly list file. However, if you are 
compiling from within the MPLAB X IDE, the default operation – in fact this cannot be 
disabled – is to always produce an assembly list file.
If you are compiling the same project from the command line and from the MPLAB X 
IDE, always check that all options are explicitly specified.