3.1.5. CPU names

There is an option to specify the CPU name:

--cpu name

Sets the target CPU. Some instructions produce either errors or warnings if assembled for the wrong target CPU (see also Controlling the output of diagnostic messages).

Valid values for name are architecture names such as 4T, 5TE, or 6T2, or part numbers such as ARM7TDMI. See ARM Architecture Reference Manual for information about the architectures. The default is ARM7TDMI®.

Note

Using --cpu=7 generates code that is supported by the ARMv7-A, ARMv7-R, and ARMv7-M architectures. This means that the assembler is restricted to producing only the Thumb instructions that are available on the ARMv-7A, ARMv7-R, and ARMv7-M architectures.

There is an option to specify another CPU or architecture name that the code is to be compatible with:

--compatible=name

Specifies a second processor or architecture, name, for which the assembler generates compatible code.

When you specify a processor or architecture name using --compatible, valid values of name for both the --cpu and --compatible options are restricted to those shown in Table 3.2 and must not be from the same group. For example:

armasm --cpu=arm7tdmi --compatible=cortex-m3 myprog.asm

Table 3.2. Compatible processor or architecture combinations

Group 1ARM7TDMI, 4T
Group 2Coretx-M0, Cortex-M1, Cortex-M3, Cortex-M4, 7-M, 6-M, 6S-M

Specify --compatible=NONE to turn off all previous instances of the option on the command line.

See the Linker User Guide for details of the effect on software library selection at link time.

Obtaining a list of valid CPU names

You can obtain a list of valid CPU and architecture names by invoking the assembler with the following command:

armasm --cpu list
Copyright © 2002-2010 ARM. All rights reserved.ARM DUI 0204J
Non-ConfidentialID101213