Datasheet
C and C++ Compilers
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 2-19
the current directory, where
file.c
is the name of the source file stripped
of any leading directory names. The default file name can be overridden
with the
-o
option.
Note
You can use armasm to assemble the output file and produce object code.
The compilers add
ASSERT
directives for command-line options such as
ATPCS variants and byte order to ensure that compatible compiler and
assembler options are used when reassembling the output. You must
specify the same ATPCS settings to both the assembler and the compiler.
-fs
This option, when used with
-S
or
-asm
, interleaves C, or C++, source
code line by line as comments within the compiler-generated assembler
code. The output code is written to
file.txt
. A text file is output because
the resulting interleaved code cannot be input to the assembler.
Note
If you use this option you cannot reassemble the output code listing from
-S
.
2.3.7 Specifying the target processor or architecture
The options described in this section 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.
Note
Specifying the target processor can make the code incompatible with other ARM
processors.
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 4T
produces
code that can be used by either the ARM7TDMI
®
or ARM9TDMI
™
.
• If you specify a processor for the
-cpu
option, for example
-cpu ARM1020E
, the
compiled code is optimized for that processor. This enables the compiler to use
specific coprocessors or instruction scheduling for optimum performance.