| |||
| Home > The ARM Compilers > Command syntax > Invoking the compiler | |||
The command for invoking the ARM compilers is:
[compiler_namePCS-options] [source-language] [search-paths] [preprocessor-options] [output-format] [target-options] [debug-options] [code-generation-options] [warning-options] [additional-checks] [error-options] [miscellaneous-options] {source}...
where:
compiler_nameis one of armcc, tcc, armcpp, tcpp.
PCS-optionsspecify the procedure call standard to use. See Procedure Call Standard options for details.
source-languagespecifies the source language that is accepted by the compiler. The default is ANSI C for the C compilers and Draft Standard C++ for the C++ compilers. See Setting the source language for details.
search-pathsspecify the directories that are searched for included files. See Specifying search paths for details.
preprocessor-optionscontrol aspects of the preprocessor, including preprocessor output and macro definitions. See Setting preprocessor options for details.
output-formatspecifies the format for the compiler output. You can use these options to generate assembly language output (including interleaved source and assembly language), listing files and unlinked object files. See Specifying output format for details.
target-optionsspecify the target processor and architecture. See Specifying the target processor and architecture for details.
debug-optionsspecify whether or not debug tables are generated, and their format. See Generating debug information for details.
code-generation-optionsspecify options such as optimization, endianness, and alignment of data produced by the compiler. See Controlling code generation for details.
warning-optionscontrol whether specific warning messages are generated. See Controlling warning messages for details.
additional-checksspecify a number of additional checks that can be applied to your code, such as checks for data flow anomalies and unused declarations. See Specifying additional checks for details.
error-optionsallow you to:
turn specific recoverable errors off
downgrade specific errors to warnings.
See Controlling error messages for details.
pragma-optionsallows you to emulate #pragma directives.
See Pragma emulation for details.
sourceare the filenames of one or more text files containing C or C++ source code, or - to specify keyboard input. By default, the compiler looks for source files, and creates object, assembler, and listing files in the current directory.
The following points apply to specifying compiler options:
Compiler options beginning with -W (warning
options), -e (error options), and -f can
have multiple modifiers specified. For example, -fh and -fp can
be combined as -fph. Similarly -Wf and -Wg can
be combined as -Wfg.
Other compiler options, such as debug options, may have specific shortcuts for common combinations. These are described in the appropriate sections below.
The following option enables you to read additional command-line options from a file:
-via filenameOpens a file and reads additional command-line options from it. For example:
armcpp -via input.txt options source.c
The options specified in are
read at the same time as any other command-line options are parsed.
If filename is specified in the Extra command
line arguments text box of the APM Compiler Configuration dialog,
the command-line options are immediately read into the tool configuration
settings.-via
You can nest -via calls within -via files.
Use - (minus) as the source filename to
instruct the compiler to take input from the keyboard. Input is
terminated by entering Ctrl-D under UNIX, or Ctrl-Z under
a MS Windows DOS environment.
An assembly listing for the function is sent to the output stream at the end of each C or C++ function if either:
no output file is specified
the -E compiler option is not specified.
If an output file is specified with the -o option,
an object file is written. If the -E option is
specified, the preprocessor output is sent to the output stream.
Use the -help compiler option to view a summary
of the compiler command-line options.
Use the -vsn compiler option to display the
version string for the compiler.