Argument variables
You can use argument variables for paths and arguments, for example when you specify include paths in the Options dialog box or whenever there is a need for a macro-like expansion that depends on the current context, for example in arguments to tools. You can use a wide range of predefined argument variables as well as create your own, see Configure Custom Argument Variables dialog box. These are the predefined argument variables:
Variable | Description |
|---|---|
| The name of the current build configuration, for example Debug or Release. |
| Current directory |
| Current line |
| Today’s date, formatted according to the current locale. Note that this might make the variable unsuited for use in file paths. |
| Top directory of IAR Embedded Workbench, for example |
| Directory for executable output |
| Filename without extension |
| Full path without extension |
| Directory of active file, no filename |
| Filename of active file without path |
| Full path of active file (in editor, project, or message window) |
| Directory for list output |
| Directory for object output |
| Project directory |
| Project filename without path |
| Full path of project file |
| Directory of primary output file |
| Filename without path of primary output file and without extension |
| Full path of primary output file without extension |
| Filename without path of primary output file |
| Full path of primary output file |
| Directory of the active product, for example |
| Your host login name |
| The active workspace directory* |
| The Windows environment variable |
| Your own argument variable, see Configure Custom Argument Variables dialog box. Any name within |
*This variable is only available in the IDE, not when using iarbuild.exe .
Argument variables can also be used on some pages in the IDE Options dialog box, see Tools menu.