| |||
| Home > Using the ARM Compiler > armcc command syntax > Specifying the target processor or architecture | |||
These options enable you to specify the target processor or architecture attributes for a compilation. The compiler can take advantage of certain extra features of the selected processor or architecture, such as support for halfword load and store instructions and instruction scheduling.
Specifying the target processor might make the code incompatible with other ARM processors.
You can specify how the compiler is configured at start-up using either:
--armTo target the ARM instruction set. This is the default.
--thumbTo target the Thumb instruction set.
For more details on these options, see Targeting the instruction set.
The following general points apply to processor and architecture options:
The supported --cpu values
are all current ARM product names or architecture versions. There
are no aliases or wildcard matching.
If you specify an architecture name for the --cpu option,
the code is compiled to run on any processor supporting that architecture.
For example, --cpu 5TE produces code that can be
used by either the ARM926EJ-S™ or ARM946E-S™.
If you specify a processor for the --cpu option,
for example --cpu ARM926EJ-S, the compiled code
is optimized for that processor. This enables the compiler to use specific
coprocessors or instruction scheduling for optimum performance.
Use only a single processor or architecture name
with --cpu. You cannot specify both a processor
and an architecture.
If --cpu is not specified, the
default is --cpu 5TE.
Specifying a processor that supports Thumb instructions,
such as --cpu ARM926EJ-S does not make the compiler
generate Thumb code. It only enables features of the processor to
be used, such as long multiply. Use the --thumb option to
generate Thumb code.
The following options are available:
--cpu listLists the supported architecture and processor names
that you can use with the --cpu option.name
--cpu nameThis option generates code for a specific ARM processor or architecture.
If is a
processor:name
You must enter the name
exactly as it is shown on ARM data sheets, for example ARM926EJ-S.
Wildcard characters are not accepted.
Selecting the processor selects the appropriate architecture, Floating-Point Unit (FPU), and memory organization.
Some specifications of --cpu imply
an --fpu selection. For example, when compiling
with the --arm option, --cpu ARM1136JF-S implies --fpu
vfpv2. Be aware that any explicit FPU
(set with --fpu) on the command line overrides
an implicit FPU.
If no --fpu option and no --cpu option
are specified, --fpu softvfp is used.
If is an
architecture, it must be one of:name
5TEARMv5 with long multiply, Thumb, interworking, DSP multiply, and double-word instructions.
--fpu listLists
the supported FPU architecture names that you can use with the --fpu option.name
Deprecated options are not listed.
--fpu nameThis option determines the target FPU architecture.
If you specify this option, it overrides any implicit FPU option
that appears on the command line, for example, where you use the --cpu option.
Valid options for are:name
noneSelects no floating-point option. No floating-point code is to be used. This produces an error if your code contains floats.
softvfpSelects
the software floating-point library (fplib). This is the default
if you do not specify a --fpu option, or if you
select a CPU that does not have an FPU.
To get a full list of FPU architectures use the --fpu
list option.