11.4 Assembler changes between RVCT v4.0 and ARM Compiler v4.1

Various changes have been made to armasm in ARM Compiler toolchain v4.1.

The following changes to the assembler have been made:

Change to the way the assembler reads and processes files

Older assemblers sometimes permitted the source file being assembled to introduce new lines of code between the two passes of the assembler. In the following example, the symbol num is defined in the second pass because the symbol foo is not defined in the first pass when :DEF: foo is evaluated.

        AREA x,CODE
        [ :DEF: foo
num     EQU 42
foo     DCD num

The way the assembler reads and processes the file has now changed, and is stricter. You must rewrite code such as this to ensure that the path through the file is the same in both passes. The introduction of new lines in the second pass of the assembler is considered an error, and results in the following error:

Error: A1903E : Line not seen in first pass; cannot be assembled.

The following code shows another example where the assembler faults:

       IF :DEF: VAR
VAR    EQU 0

To avoid this error, you must rewrite this code as:

       IF :LNOT: :DEF: VAR
VAR    EQU 0

This works correctly because new lines are not seen in the second pass of the assembler. Instead the lines that were in the first pass are ignored in the second pass.

Change to messages output by the assembler

Generally, any messages referring to a position on the source line now has a caret character pointing to the offending part of the source line, for example:

"foo.s", line 3 (column 19): Warning: A1865W: '#' not seen before constant expression
    3 00000000         ADD r0,r1,1
Changes to diagnostic messages

In the ARM instruction set, various instructions using SP (r13) were deprecated when Thumb-2 technology was introduced. These instructions are no longer diagnosed as deprecated unless assembling for a CPU that supports Thumb-2 technology. To enable the warnings on earlier CPUs, you can use the option --diag_warning=1745,1786,1788,1789,1892. This change was introduced in the RVCT v4.0 patch 5 (build 697).

Obsolete command-line option

The -O command-line option is obsolete. Use -o instead.

Non-ConfidentialPDF file icon PDF versionARM DUI0530M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.