Skip to main content

IAR Embedded Workbench for RH850 3.20.x

Assembler options

In this section:

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 command line options

To set assembler options from the command line, include them on the command line after the iasmrh850 command, either before or after the source filename. For example, when assembling the source file prog.s, use this command to generate an object file with debug information:

iasmrh850 prog.s ‑‑debug

Some options accept a filename, included after the option letter with a separating space. For example, to generate a listing to the file prog.lst:

iasmrh850 prog.s -l prog.lst

Some other options accept a string that is not a filename. The string is included after the option letter, but without a space. For example, to define a symbol:

iasmrh850 prog.s -DDEBUG=1

Generally, the order of options on the command line, both relative to each other and to the source filename, is not significant. However, there is one exception—when you use the -I option, the directories are searched in the same order as they are specified on the command line.

Notice that a command line option has a short name and/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 ‑‑debug.

Specifying parameters

When a parameter is needed for an option with a short name, you can specify it either immediately following the option or as the next command line argument.

For instance, you can specify an include file path of \usr\include either as:

-I\usr\include

or as

-I \usr\include

Note

You can use / instead of \ as directory delimiter. A trailing slash or backslash can be added to the last directory name, but is not required.

Additionally, some options can take a parameter that is a directory name. The output file then receives a default name and extension.

When a parameter is needed for an option with a long name, you can specify it either immediately after the equal sign (=) or as the next command line argument, for example:

‑‑diag_suppress=Pe0001

or

‑‑diag_suppress Pe0001

Options that accept multiple values can be repeated, and can also have comma-separated values (without space), for example:

‑‑diag_warning=Be0001,Be0002

The current directory is specified with a period (.), for example:

iasmrh850 prog -l .

A file specified by - (a single dash) is standard input or output, whichever is appropriate.

Note

When an option takes a parameter, the parameter cannot start with a dash (-) followed by another character. Instead you can prefix the parameter with two dashes (‑‑). This example generates a list on standard output:

iasmrh850 prog -l ‑‑-

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:

iasmrh850 -f extend.xcl