Compiler command-line syntax

The command for invoking the compiler is:

armcc [options] [source]

Where:

options

are compiler command-line options that affect the behavior or the compiler.

source

provides the filenames of one or more text files containing C or C++ source code. By default, the compiler looks for source files and creates output files in the current directory.

If a source file is an assembly file, that is, one with an extension of .s, the compiler activates the ARM assembler to process the source file.

When you invoke the compiler, you normally specify one or more source files. However, a minority of compiler command-line options do not require you to specify a source file. For example, armcc --version_number.

The compiler accepts one or more input files, for example:

armcc -c [options] input_file_1 ... input_file_n

To accept input from stdin, specify a dash - for an input file, for example:

armcc -c [options] - 

To specify that all subsequent arguments are treated as filenames, not as command switches, use the POSIX option --.

The -c option instructs the compiler to perform the compilation step, but not the link step.

Show/hideSee also

Reference

Compiler Reference:

Introducing the ARM Compiler toolchain:

Copyright © 2007-2008, 2011 ARM. All rights reserved.ARM DUI 0375C
Non-ConfidentialID061811