|Non-Confidential||PDF version||ARM DUI0375E|
|Home > Compiler Command-line Options > --cpu=name compiler option|
Enables code generation for the selected ARM processor or architecture.
nameis the name of a processor or architecture:
is the name of a processor, enter it as shown on ARM data sheets, for example,
is the name of an architecture, it must belong to the list of architectures shown in the following table.
Table 7-3 Supported ARM architectures
||ARMv4 without Thumb||SA-1100|
||ARMv4 with Thumb||ARM7TDMI, ARM9TDMI, ARM720T, ARM740T, ARM920T, ARM922T, ARM940T, SC100|
||ARMv5 with Thumb and interworking||-|
||ARMv5 with Thumb, interworking, DSP multiply, and double-word instructions||ARM9E, ARM946E-S, ARM966E-S|
ARMv5 with Thumb, interworking, DSP multiply, double-word instructions, and Jazelle® extensions
armcc cannot generate Java bytecodes.
|ARM926EJ-S, ARM1026EJ-S, SC200|
||ARMv6 with Thumb, interworking, DSP multiply, double-word instructions, unaligned and mixed-endian support, Jazelle, and media extensions||ARM1136J-S, ARM1136JF-S|
||ARMv6 micro-controller profile with Thumb only, plus processor state instructions||Cortex-M1 without OS extensions, Cortex-M0, SC000, Cortex-M0plus|
||ARMv6 micro-controller profile with Thumb only, plus processor state instructions and OS extensions||Cortex-M1 with OS extensions|
||ARMv6 with SMP extensions||MPCore|
||ARMv6 with Thumb (Thumb-2 technology)||ARM1156T2-S, ARM1156T2F-S|
||ARMv6 with Security Extensions||ARM1176JZF-S, ARM1176JZ-S|
||ARMv7 with Thumb (Thumb-2 technology) only, and without hardware divide||-|
||ARMv7 real-time profile with ARM, Thumb (Thumb-2 technology), DSP support, and 32-bit SIMD support||Cortex-R4, Cortex-R4F, Cortex-R7|
||ARMv7 micro-controller profile with Thumb (Thumb-2 technology) only and hardware divide||Cortex-M3, SC300|
||ARMv7-M enhanced with DSP (saturating and 32-bit SIMD) instructions||Cortex-M4|
--cpu=7denotes the features that are common to the ARMv7-A, ARMv7-R, and ARMv7-M architectures. By definition, any given feature used with
--cpu=7exists on the ARMv7-A, ARMv7-R, and ARMv7-M architectures.
--cpu=ARM7TDMIif you do not specify a
--cpuvalues include all current ARM product names or architecture versions.
--cpuoption, the generated code is optimized for that processor. This enables the compiler to use specific coprocessors or instruction scheduling for optimum performance.
--cpuoption, the generated code can run on any processor supporting that architecture. For example,
--cpu=5TEproduces code that can be used by the ARM926EJ-S® processor.
--fpuon the command line, overrides an implicit FPU.
--fpuoption is specified and no
--cpuoption is specified,
--cpu=ARM7TDMI, does not make the compiler generate Thumb code. It only enables features of the processor to be used, such as long multiply. Use the
--thumboption to generate Thumb code, unless the processor is a Thumb-only processor, for example Cortex-M4. In this case,
--thumbis not required.
--apcs=/interwork. By default, this is enabled for processors that support ARMv5T or above.
--thumboption on the command line, the compiler generates as much of the code as possible using the Thumb instruction set. However, the compiler might generate ARM code for some parts of the compilation. For example, if you are generating code for a 16-bit Thumb processor and using VFP, any function containing floating-point operations is compiled for ARM.
--thumbon the command line. For example, if building for ARMv7-M with
--cpu=7-M, you do not have to specify
--thumbon the command line, because ARMv7-M only supports Thumb. Similarly, ARMv6-M and other Thumb-only architectures.