Operation
If you use Arm Development Studio to build projects with the CMSIS-Pack, use -masm=auto
, because some of the assembly files in the CMSIS-Pack contain legacy armasm
syntax assembly code. When invoking the legacy armasm
assembler, the most commonly used options are translated from the armclang
command-line options to the appropriate armasm
command-line options, which the Translatable options table shows.
Table
B1-4 Translatable options
armclang option |
armasm option |
-mcpu, -march |
--cpu |
-marm |
--arm |
-mthumb |
--thumb |
-fropi |
--apcs=/ropi |
-frwpi |
--apcs=/rwpi |
-mfloat-abi=soft
-mfloat-abi=softfp
-mfloat-abi=hard
|
--apcs=/softfp
--apcs=/softfp
--apcs=/hardfp
|
-mfpu |
--fpu |
-mbig-endian |
--bigend |
-mlittle-endian |
--littleend |
-g |
-g |
-ffp-mode |
--fpmode |
-DNAME |
--predefine "NAME SETA 1" |
-Idir |
-idir |
If you need to provide additional options to the legacy armasm
assembler, which are not listed in the Translatable options table, then use -Wa,armasm,option
,value
. For example:
-
If you want to use the legacy armasm
assembler option --show_cmdline
to see the command-line options that have been passed to the legacy armasm
assembler, then use:
-Wa,armasm,--show_cmdline
-
If the legacy armasm
syntax source file requires the option --predefine "NAME SETA 100"
, then use:
-Wa,armasm,--predefine,"NAME SETA 100"
-
If the legacy armasm
syntax source file requires the option --predefine "NAME SETS \"Version 1.0\""
, then use:
-Wa,armasm,--predefine,"NAME SETS \"Version 1.0\""
Note:
The command-line interface of your system might require you to enter special character combinations to achieve correct quoting, such as \"
instead of "
.
Note:
Arm Compiler 6 provides the
-masm
option as a short term solution to enable the assembly of legacy
armasm
syntax assembly source files. The
-masm
option will be removed in a future release of
Arm Compiler 6.
Arm recommends that you migrate all legacy
armasm
syntax assembly source files into GNU syntax assembly source files. For more information, see
Migrating from armasm to the armclang integrated assembler in the Migration and Compatibility Guide.
If you are using the compiler from outside Arm Development Studio, such as from the command-line, then Arm recommends that you do not specify the -masm
option, and instead invoke the correct assembler explicitly.