Keil Logo

Technical Support

On-Line Manuals

Compiler User Guide

Preface Overview of the Compiler Getting Started with the Compiler Compiler command-line syntax Compiler command-line options listed by group Default compiler behavior Order of compiler command-line options Using stdin to input source code to the compiler Directing output to stdout Filename suffixes recognized by the compiler Compiler output files Factors influencing how the compiler searches for Compiler command-line options and search paths Compiler search rules and the current place The ARMCC5INC environment variable Code compatibility between separately compiled and Linker feedback during compilation Unused function code Minimizing code size by eliminating unused functio Compilation build time Compilation build time Minimizing compilation build time Minimizing compilation build time with a single ar Effect of --multifile on compilation build time Minimizing compilation build time with parallel ma Compilation build time on Windows Compiler Features Compiler Coding Practices Compiler Diagnostic Messages Using the Inline and Embedded Assemblers of the AR Compiler Command-line Options Language Extensions Compiler-specific Features C and C++ Implementation Details What is Semihosting? Via File Syntax Summary Table of GNU Language Extensions Standard C Implementation Definition Standard C++ Implementation Definition C and C++ Compiler Implementation Limits

Compiler command-line syntax

2.1 Compiler command-line syntax

Use the armcc command from the command-line to invoke the compiler. Specify the source files you want to compile, together with any options you need to control compiler behavior.

The command for invoking the compiler is:
armcc [options] [source]
are compiler command-line options that affect the behavior of the compiler.
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
Specifying a dash - for an input file causes the compiler to read from stdin. 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.
Related reference
Non-ConfidentialPDF file icon PDF versionARM DUI0375H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.