| |||
| Home > Assembler Reference > Command syntax > CPU names | |||
There is an option to specify the CPU name:
--cpu nameSets 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 are
architecture names such as name4T, 5TE,
or 6T2, or part numbers such as ARM7TDMI.
See ARM Architecture Reference Manual for information
about the architectures. The default is ARM7TDMI®.
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=nameSpecifies a second processor or architecture, ,
for which the assembler generates compatible code. name
When you specify a processor or architecture name using --compatible, valid
values of for both
the name--cpu and --compatible options
are restricted to those shown in Table 3.1 and must not be from the same group.
For example:
armasm --cpu=arm7tdmi --compatible=cortex-m3 myprog.asm
Table 3.1. Compatible processor or architecture combinations
| Group 1 | ARM7TDMI, 4T |
| Group 2 | Cortex-M1, Cortex-M3, 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.