Changing the Compiler's Behavior with Options
www.ti.com
2.3 Changing the Compiler's Behavior with Options
Options control the operation of the compiler. This section provides a description of option conventions
and an option summary table. It also provides detailed descriptions of the most frequently used options,
including options used for type-checking and assembling.
For a help screen summary of the options, enter cl2000 with no parameters on the command line.
The following apply to the compiler options:
• Options are preceded by one or two hyphens.
• Options are case sensitive.
• Options are either single letters or sequences of characters.
• Individual options cannot be combined.
• An option with a required parameter should be specified with an equal sign before the parameter to
clearly associate the parameter with the option. For example, the option to undefine a constant can be
expressed as --undefine=name. Although not recommended, you can separate the option and the
parameter with or without a space, as in --undefine name or -undefinename.
• An option with an optional parameter should be specified with an equal sign before the parameter to
clearly associate the parameter with the option. For example, the option to specify the maximum
amount of optimization can be expressed as -O=3. You can specify the parameter directly after the
option, as in -O3. No space is allowed between the option and the optional parameter, so -O 3 is not
accepted.
• Files and options except the --run_linker option can occur in any order. The --run_linker option must
follow all other compile options and precede any link options.
You can define default options for the compiler by using the C2000_C_OPTION environment variable. For
a detailed description of the environment variable, see Section 2.4.1.
Table 2-7 through Table 2-29 summarize all options (including link options). Use the references in the
tables for more complete descriptions of the options.
Table 2-1. Processor Options
Option Alias Effect Section
--silicon_version=28 -v28 Specifies TMS320C28x architecture. When not specified defaults to Section 2.3.4
TMS320C27x.
--large_memory_model -ml Generates large memory model code and allows conditional Section 2.3.4,
compilation of 16-bit code with large memory model code Section 6.6.1
--unified_memory -mt Generates code for the unified memory model Section 2.3.4
--cla_support[=cla0|cla1] Specifies TMS320C28x CLA accelerator support Type 0 or Type 1. Section 2.3.4
Default is cla0.
--float_support={fpu32|softlib|fpu64} Specifies use of TMS320C28x 32- or 64-bit hardware floating-point Section 2.3.4
support. The default is softlib.
--tmu_support[=tmu0] Enables support for the Trigonometric Math Unit (TMU). Section 2.3.4
Using this option also enables FPU32 support (as with
--float_support=fpu32). If this option is used but no value is specified,
the default is tmu0.
--vcu_support[=vcu0|vcu2] Specifies C28x VCU coprocessor support Type 0 or Type 2. Default Section 2.3.4
is vcu0.
Table 2-2. Optimization Options
(1)
Option Alias Effect Section
--opt_level=off -Ooff Disables all optimization (default) Section 3.1
--opt_level=0 -O0 Optimizes register usage Section 3.1
--opt_level=1 -O1 Uses -O0 optimizations and optimizes locally Section 3.1
--opt_level=2 -O2 Uses -O1 optimizations and optimizes globally Section 3.1
(1)
Note: Machine-specific options (see Table 2-12) can also affect optimization.
18
Using the C/C++ Compiler SPRU514G–December 2013
Submit Documentation Feedback
Copyright © 2013, Texas Instruments Incorporated