|Non-Confidential||PDF version||ARM DUI0375F|
|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:
as shown on ARM data sheets, for example,
Table 7-3 Supported ARM architectures
|Architecture||Description||Example processor names|
||ARMv4 with Thumb||
||ARMv5 with Thumb, interworking, DSP multiply, and double-word instructions||
ARMv5 with Thumb, interworking, DSP multiply, double-word instructions, and Jazelle® extensions
armcc cannot generate Java bytecodes.
||ARMv6 micro-controller profile with Thumb only, plus processor state instructions||
||ARMv6 micro-controller profile with Thumb only, plus processor state instructions and OS extensions||
||ARMv7 real-time profile with ARM, Thumb (Thumb-2 technology), DSP support, and 32-bit SIMD support||
||ARMv7 micro-controller profile with Thumb (Thumb-2 technology) only and hardware divide||
||ARMv7-M enhanced with DSP (saturating and 32-bit SIMD) instructions||
--cpu=ARM7TDMIif you do not specify a
--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.