Assembler options
This section first explains how to set the assembler options from the command line and how to use environment variables. It then gives an alphabetical summary of the assembler options, and contains detailed reference information about each option.
Using command line assembler options
Assembler options are parameters you can specify to change the default behavior of the assembler. You can specify options from the command line—which is described in more detail in this section—and from within the IAR Embedded Workbench® IDE.
Caution
Assembler options describes how to set assembler options in the IDE, and gives reference information about the available options.
Specifying options and their parameters
To set assembler options from the command line, include them after the iasmarm command:
iasmarm [options] [sourcefile] [options]
These items must be separated by one or more spaces, or tab characters.
Notice that a command line option has a short name or a long name:
A short option name consists of one character, with or without parameters. You specify it with a single dash, for example
-r.A long name consists of one or several words joined by underscores, with or without parameters. You specify it with double dashes, for example
‑‑source_encoding.
If all the optional parameters are omitted, the assembler displays a list of available options a screenful at a time. Press Enter to display the next screenful.
For example, when assembling the source file power2.s, use this command to generate a list file to the default filename (power2.lst):
iasmarm power2.s -L
Some options accept a filename (that may be prefixed by a path), included after the option letter with a separating space. For example, to generate a list file with the name list.lst:
iasmarm power2.s -l list.lst
Some options accept a parameter that is not a filename. For options with a long name, the option and the parameter can be separated with a space character, an = sign, or a #. For options with a short name, the parameter is included after the option letter, but without a space. For example, to generate a list file to the default filename but in the subdirectory named list:
iasmarm power2.s -Llist\
Note
The subdirectory you specify must already exist. The trailing backslash is required to separate the name of the subdirectory from the default filename.
Warning
If you use the page Extra Options to specify specific command line options, the IDE does not perform an instant check for consistency problems like conflicting options, duplication of options, or use of irrelevant options.
Extended command line file
In addition to accepting options and source filenames from the command line, the assembler can accept them from an extended command line file.
By default, extended command line files have the extension xcl, and can be specified using the -f command line option. For example, to read the command line options from extend.xcl, enter:
iasmarm -f extend.xcl