5.1. Command syntax

Note

The ARM assembler, armasm, assembles both ARM and Thumb assembly languages. The obsolete Thumb assembler, tasm, is provided in the Software Development Toolkit for backwards compatibility only.

Invoke the ARM assembler using this command:

armasm Space[-apcsSpace[ none | Space 3[/qualifier[/qualifier[...]]]]]Space[-archSpace{architecture}]Space [ -bigend | Space -littleend]Space[-checkreglist]Space[-cpuSpace{ARMcore}]Space[-dependSpace{dependfile}]Space[-errorsSpace{errorfile}]Space[-g]Space[-help]Space[-keep]Space[-iSpace{dir}Space[,dir]...]Space[-listSpace{listingfile}Space[options]]Space[-maxcacheSpace{n}]Space[-MD-]Space[-nocache]Space[-noesc]Space[-noregs]Space[-nowarn]Space[-oSpace{filename}]Space[-predefineSpace{"directive}"]Space[-processorSpace{ARMcore}]Space[-unsafe]Space[-viaSpace{file}]Space[ -16 | Space -32]Space{inputfile}

where:

-apcsnone3[/qualifier[/qualifier]]

specifies whether you are using the ARM Procedure Call Standard or not, and may specify some attributes of code areas. See Chapter 6 Using the Procedure Call Standards in the ARM Software Development Toolkit User Guide for more information.

none

specifies that inputfile does not use APCS. APCS registers are not set up. Qualifiers are not allowed.

3

specifies that inputfile uses APCS version 3. APCS registers are set up. This is the default.

Values for qualifier are:

nointerwork

specifies that the code is not suitable for ARM/Thumb interworking. This is the default.

interwork

specifies that the code is suitable for ARM/Thumb interworking. This option has the same effect as specifying the INTERWORK attribute for all code areas in the source files to be assembled. Refer to the ARM Software Development Toolkit User Guide for more information on ARM/Thumb interworking.

swstackcheck

specifies that the code in inputfile carries out software stack checking.

noswstackcheck

specifies that the code in inputfile does not carry out software stack-limit checking. This is the default.

reentrant

specifies that the code in inputfile is reentrant. This option is obsolete and is provided for backwards compatibility only. The SDT version 2.50 linker does not link objects assembled with -apcs /reentrant.

nonreentrant

specifies that the code in inputfile is non reentrant. This is the default.

fp

specifies that the code in inputfile uses a frame pointer. This option is obsolete and is provided for backwards compatibility only.

nofp

specifies that the code in inputfile does not use a frame pointer. This is the default.

-arch architecture

sets the target architecture. Some processor-specific instructions produce either errors or warnings if assembled for the wrong target architecture. See also the -unsafe assembler option. Valid values for architecture are 3, 3m, 4, 4T, 4TxM.

-bigend

instructs the assembler to assemble code suitable for a big-endian ARM. This option sets the built-in variable {ENDIAN} to big. The default is -littleend.

-checkreglist

instructs the assembler to check RLIST, LDM, and STM register lists to ensure that all registers are provided in increasing register number order. If this is not the case, a warning is given.

-cpu ARMcore

sets the target ARM core. Valid values for ARMcore are:

ARM6

an ARM 6 family processor.

ARM7

an ARM 7 family processor.

ARM7M

an ARM 7 family processor with fast multiplier.

ARM7T

an ARM 7 family processor with Thumb.

ARM7TDI

an ARM 7 family processor with Thumb and debug extensions.

ARM7TDMI

an ARM 7 family processor with Thumb, debug and fast multiplier.

ARM7TM

an ARM 7 family processor with Thumb and fast multiplier.

ARM8

an ARM 8 family processor.

ARM9

an ARM 9 family processor.

ARM9TM

an ARM 9 family processor with Thumb and fast multiplier.

StrongARM1

a StrongARM1 processor.

SA-110

an SA-110 processor.

-depend , dependfile

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

-errors errorfile

instructs the assembler to output error messages to errorfile.

-g

instructs the assembler to generate debug tables. Use the following command-line options to control the behavior of -g:

-dwarf

to select DWARF1 debug tables. This option is obsolete. Use -dwarf2 or -dwarf1.

-dwarf1

to select DWARF1 debug tables. This option is not recommended for C++.

-dwarf2

to select DWARF2 debug tables. This is the default and is selected if -g with no dwarf option is specified.

-help

instructs the assembler to display a summary of the assembler command-line options.

-keep

instructs the assembler to keep local labels in the symbol table of the object file, for use by the debugger. See KEEP directive.

-idir,dir

adds directories to the source file search path so that arguments to GET/INCLUDE directives do not need to be fully qualified. See GET or INCLUDE directive and INCBIN directive.

-list listingfile options

instructs the assembler to output a detailed listing of the assembly language produced by the assembler to listingfile. Use the following command-line options to control the behavior of -list:

-noterse

turns the terse flag off. When this option is on, lines skipped due to conditional assembly do not appear in the listing. If the terse option is off, these lines do appear in the listing. The default is on.

-width

sets the listing page width. The default is 79 characters.

-length

sets the listing page length. Length zero means an unpaged listing. The default is 66 lines.

-xref

instructs the assembler to list cross-referencing information on symbols, including where they were defined and where they were used, both inside and outside macros. The default is off.

-littleend

instructs the assembler to assemble code suitable for a little-endian ARM. This option sets the built-in variable {ENDIAN} to little. This is the default.

-maxcache, n

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

-MD-

is for the use of the ARM Project Manager. It instructs the assembler to write makefile dependencies to the Project Manager.

-nocache

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

-noesc

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

-noregs

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

-nowarn

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. You must enclose directive in double quotes. See:

The assembler executes a corresponding GBLL, GBLS, or GBLA directive to define the variable before setting its value. Arguments to SETS must be enclosed in escaped double quotation marks, for example:


-pd "Version SETS \"beta-4\""
-pd "VersionNum SETA 4"

-processor ARMcore

is a synonym for -cpu

-unsafe

allows assembly of a file containing instructions that are not available on the specified architecture and processor. Corresponding error messages are changed to warning messages.

-via file

instructs the assembler to open file and read in command-line arguments to the assembler.

-16

instructs the assembler to interpret instructions as Thumb instructions. This is equivalent to placing a CODE16 directive at the head of the source file.

-32

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

inputfile

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

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C
Non-Confidential