You copied the Doc URL to your clipboard.

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 Arm Compiler Reference Guide for more information about armclang command-line options.

Common armclang options include the following:

Table 2-1 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 -march=armv8-a or -march=armv7-a.

-march=list

Displays a list of all the supported architectures for the selected execution state.

-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 the selected execution state.

-marm

Requests that the compiler targets the A32 instruction set, which is 32-bit instructions. For example, --target=arm-arm-none-eabi -march=armv7-a -marm. This option emphasizes performance.

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

-mthumb

Requests that the compiler targets the T32 instruction set, which is mixed 32-bit and 16-bit instructions. For example, --target=arm-arm-none-eabi -march=armv8-a -mthumb. This option emphasizes code density.

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

-mfloat-abi Specifies whether to use hardware instructions or software library functions for floating-point operations.
-mfpu Specifies the target FPU architecture.
-g Generates DWARF debug tables compatible with the DWARF 4 standard.
-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 that the compiler generates.
-### Displays diagnostic output showing the options that would be used to invoke the compiler and linker. The compilation and link steps are not performed.

armlink common options

See the Arm Compiler Reference Guide for more information about armlink command-line options.

Common armlink options include the following:

Table 2-2 armlink common options

Option Description
--scatter=filename Creates an image memory map using the scatter-loading description that the specified file contains.
--entry Specifies the unique initial entry point of the image.
--info Displays information about linker operation. For example, --info=sizes,unused,unusedsymbols displays information about all of the following:
  • Code and data sizes for each input object and library member in the image.
  • Unused sections that --remove has removed from the code.
  • Symbols that were removed with the unused sections.
--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 that is used in the link step, and their values.
-o filename, --output=filename Specifies the name of the output file.
--keep=section_id Specifies input sections that unused section elimination must not remove.
--load_addr_map_info Includes the load addresses for execution regions and the input sections within them in the map file.

armar common options

See the Arm Compiler Reference Guide for more information about armar command-line options.

Common armar options include the following:

Table 2-3 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 Arm Compiler Reference Guide for more information about fromelf command-line options.

Common fromelf options include the following:

Table 2-4 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 Arm Compiler Reference Guide for more information about armasm command-line options.

Note

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

Common armasm options include the following:

Table 2-5 armasm common options

Option Description
--cpu=name Sets the target processor.
-g Generates DWARF debug tables compatible with the DWARF 3 standard.
--fpu=name Selects the target floating-point unit (FPU) architecture.
-o Specifies the name of the output file.
Was this page helpful? Yes No