3.1. Command syntax

This section relates only to armasm. The inline assemblers are part of the C and C++ compilers, and have no command syntax of their own.

The armasm command line is case-insensitive, except in filenames, and where specified.

Invoke the ARM assembler using this command:

armasm Space optionsSpace{inputfile}

where options can be any combination of the following, separated by spaces:

--16

Instructs the assembler to interpret instructions as Thumb® instructions, using the old Thumb syntax. This is equivalent to a CODE16 directive at the head of the source file. Use the --thumb option to specify Thumb or Thumb-2 instructions using the ARM syntax.

--32

Instructs the assembler to interpret instructions as ARM instructions. This is the default.

--apcs , [qualifiers]

Specifies whether you are using the Procedure Call Standard for the ARM Architecture (AAPCS). It can also specify some attributes of code sections. See AAPCS for details.

--arm

Is a synonym for --32.

--bigend

Instructs the assembler to assemble code suitable for a big-endian ARM. The default is --littleend.

--brief_diagnostics

See Controlling the output of diagnostic messages.

--littleend

Instructs the assembler to assemble code suitable for a little-endian ARM.

--checkreglist

Instructs the assembler to check RLIST, LDM, and STM register lists to ensure that all registers are provided in increasing register number order. A warning is given if registers are not listed in order.

--cpu name

Sets the target CPU. See CPU names.

--debug

Instructs the assembler to generate DWARF debug tables.

The default is DWARF2. For backwards compatibility, the --dwarf2 option is permitted, but not required.

--depend dependfile

Instructs the assembler to save source file dependency lists to dependfile. These are suitable for use with make utilities.

--diag_[error | remark | warning | suppress | style]

See Controlling the output of diagnostic messages.

--dllexport_all

Instructs the assembler to give dynamic visibility of all global symbols, unless specified otherwise. Use this option when building DLLs.

--dwarf2

Use with --debug, to instruct the assembler to generate DWARF2 debug tables. This is the default if --debug is specified.

--dwarf3

Use with --debug, to instruct the assembler to generate DWARF3 debug tables.

-m

Instructs the assembler to write source file dependency lists to stdout.

--md

Instructs the assembler to write source file dependency lists to inputfile.d.

--errors errorfile

Instructs the assembler to output error messages to errorfile.

--exceptions

See Controlling exception table generation.

--exceptions_unwind

See Controlling exception table generation.

--fpmode model

Specifies the floating-point conformance, and sets library attributes and floating-point optimizations. See Floating-point model.

--fpu name

Selects the target floating-point unit (FPU) architecture. See FPU names.

-idir,dir

Adds directories to the source file have to be fully qualified (see GET or INCLUDE).

--keep

Instructs the assembler to keep local labels in the symbol table of the object file, for use by the debugger (see KEEP).

--listlistingfile

Instructs the assembler to output a detailed listing of the assembly language produced by the assembler to listingfile. See Listing output to a file for details.

--maxcache n

Sets the maximum source cache size to n bytes. The default is 8MB.

--memaccess attributes

Specifies memory access attributes of the target memory system. See Memory access attributes.

--no_cache

Turns off source caching. By default the assembler caches source files on the first pass and reads them from memory on the second pass.

--no_esc

Instructs the assembler to ignore C-style escaped special characters, such as \n and \t.

--no_exceptions

See Controlling exception table generation.

--no_exceptions_unwind

See Controlling exception table generation.

--no_hide_all

Enables you to control symbol visibility when building SVr4 shared objects where all extern definitions are exported, and all undefined references are imported.

--no_regs

Instructs the assembler not to predefine register names. See Predefined register and coprocessor names for a list of predefined register names.

--no_warn

Turns off warning messages.

-o filename

Names the output object file. If this option is not specified, the assembler uses the second command-line argument that is not a valid command-line option as the name of the output file. If there is no such argument, the assembler creates an object filename of the form inputfilename.o.

--predefine "directive"

Instructs the assembler to pre-execute one of the SET directives. See Pre-executing a SET directive for details.

--split_ldm

Instructs the assembler to fault long LDM and STM instructions. See Splitting long LDMs and STMs for details.

--thumb

Instructs the assembler to interpret instructions as Thumb instructions, using the ARM syntax. This is equivalent to a THUMB directive at the head of the source file.

--unsafe

Downgrades errors to warnings. See Controlling the output of diagnostic messages).

--via file

Instructs the assembler to open file and read in command-line arguments to the assembler. For more information see the Via File Syntax appendix in RealView Compilation Tools v2.2 Compiler and Libraries Guide.

inputfile

Specifies the input file for the assembler. Input files must be ARM or Thumb assembly language source files.

Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0204F
Non-Confidential