1.4 Common ARM Compiler toolchain options

Lists the most commonly used command-line options for each of the tools in the ARM Compiler toolchain.

armclang common options

See the armclang Reference Guide for more information about armclang command-line options.

Common armclang options include the following:

Table 1-3 armclang common options

Option Description
-c Performs the compilation step, but not the link step.
-x Specifies the language of the subsequent source files, -xc inputfile.s or -xc++ inputfile.s for example.
-std Specifies the language standard to compile for, -std=c90 for example.
--target=arch-vendor-os-abi Generates code for the selected execution state (AArch32 or AArch64), for example --target=aarch64-arm-none-eabi or --target=arm-arm-none-eabi.
-march=name

Generates code for the specified architecture, for example -mcpu=armv8-a or -mcpu=armv7-a.

-march=list

Displays a list of all the supported architectures for your target.

-mcpu=name

Generates code for the specified processor, for example -mcpu=cortex-a53, -mcpu=cortex-a57, or -mcpu=cortex-a15.

-mcpu=list

Displays a list of all the supported processors for your target.

-marm

Requests that the compiler targets the A32 instruction set, --target=arm-arm-none-eabi -march=armv7-a -marm for example.

The -marm option is not valid with AArch64 targets. The compiler ignores the -marm option and generates a warning with AArch64 targets.

-mthumb

Requests that the compiler targets the T32 instruction set, --target=arm-arm-none-eabi -march=armv8-a -mthumb for example.

The -mthumb option is not valid with AArch64 targets. The compiler ignores the -mthumb option and generates a warning with AArch64 targets.

-g Generates DWARF debug tables.
-E Executes only the preprocessor step.
-I Adds the specified directories to the list of places that are searched to find included files.
-o Specifies the name of the output file.
-Onum Specifies the level of performance optimization to use when compiling source files.
-Os Balances code size against code speed.
-Oz Optimizes for code size.
-S Outputs the disassembly of the machine code generated by the compiler.
-### Displays diagnostic output showing the options that would be used to invoke the compiler and linker. Neither the compilation nor the link steps are performed.

armlink common options

See the armlink User Guide for more information about armlink command-line options.

Common armlink options include the following:

Table 1-4 armlink common options

Option Description
--ro_base Sets the load and execution addresses of the region containing the RO output section to a specified address.
--rw_base Sets the execution address of the region containing the RW output section to a specified address.
--scatter Creates an image memory map using the scatter-loading description contained in the specified file.
--split Splits the default load region containing the RO and RW output sections, into separate regions.
--entry Specifies the unique initial entry point of the image.
--info Displays information about linker operation, for example --info=exceptions displays information about exception table generation and optimization.
--list=filename Redirects diagnostics output from options including --info and --map to the specified file.
--map Displays a memory map containing the address and the size of each load region, execution region, and input section in the image, including linker-generated input sections.
--symbols Lists each local and global symbol used in the link step, and their values.

armar common options

See the armar User Guide for more information about armar command-line options.

Common armar options include the following:

Table 1-5 armar common options

Option Description
--debug_symbols Includes debug symbols in the library.
-a pos_name Places new files in the library after the file pos_name.
-b pos_name Places new files in the library before the file pos_name.
-d file_list Deletes the specified files from the library.
--sizes Lists the Code, RO Data, RW Data, ZI Data, and Debug sizes of each member in the library.
-t Prints a table of contents for the library.

fromelf common options

See the fromelf User Guide for more information about fromelf command-line options.

Common fromelf options include the following:

Table 1-6 fromelf common options

Option Description
--elf Selects ELF output mode.
--text [options]

Displays image information in text format.

The optional options specify additional information to include in the image information. Valid options include -c to disassemble code, and -s to print the symbol and versioning tables.

--info Displays information about specific topics, for example --info=totals lists the Code, RO Data, RW Data, ZI Data, and Debug sizes for each input object and library member in the image.

armasm common options

See the armasm User Guide for more information about armasm command-line options.

Note:

Only use armasm to assemble legacy assembly code using ARM syntax. Use GNU syntax for new assembly files, and assemble with the armclang assembler.

Common armasm options include the following:

Table 1-7 armasm common options

Option Description
--cpu=name Sets the target processor.
-g Generates DWARF debug tables.
--fpu=name Selects the target floating-point unit (FPU) architecture.
-o Specifies the name of the output file.
Non-ConfidentialPDF file icon PDF versionARM 100066_0608_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.