Skip to main content

IAR Embedded Workbench for Arm 10.10.x

Argument variables

In this section:

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

$CONFIG_NAME$

The name of the current build configuration, for example Debug or Release.

$CUR_DIR$

Current directory

$CUR_LINE$

Current line

$DATE$

Today’s date, formatted according to the current locale. Note that this might make the variable unsuited for use in file paths.

$EW_DIR$

Top directory of IAR Embedded Workbench, for example c:\iar\ewarm-2.1

$EXE_DIR$

Directory for executable output

$FILE_BNAME$

Filename without extension

$FILE_BPATH$

Full path without extension

$FILE_DIR$

Directory of active file, no filename

$FILE_FNAME$

Filename of active file without path

$FILE_PATH$

Full path of active file (in editor, project, or message window)

$LIST_DIR$

Directory for list output

$OBJ_DIR$

Directory for object output

$PROJ_DIR$

Project directory

$PROJ_FNAME$

Project filename without path

$PROJ_PATH$

Full path of project file

$TARGET_DIR$

Directory of primary output file

$TARGET_BNAME$

Filename without path of primary output file and without extension

$TARGET_BPATH$

Full path of primary output file without extension

$TARGET_FNAME$

Filename without path of primary output file

$TARGET_PATH$

Full path of primary output file

$TOOLKIT_DIR$

Directory of the active product, for example c:\iar\ewarm-2.1\arm

$USER_NAME$

Your host login name

$WS_DIR$

The active workspace directory*

$_ENVVAR_$

The Windows environment variable ENVVAR. Any name within $_ and _$ will be expanded to that system environment variable.

$MY_CUSTOM_VAR$

Your own argument variable, see Configure Custom Argument Variables dialog box. Any name within $ and $ will be expanded to the value you have defined.

Table 3. Argument variables


*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.