Syntax

-Dname
-Dname=value

Description

This option instructs the assembler to define a symbol for the compilation unit. If no value is given, the symbol is defined to the value -1.

Setting this in CrossStudio

To define symbols for a project:

To define symbols for a particular file:

The Preprocessor Definitions property is a semicolon-separated list of symbol definitions, for example “name1=value1;name2=value2”. Clicking the button at the right of the property displays the Preprocessor Definitions dialog which will allow you to easily edit the definitions.

Example

The following defines two macros, SUPPORT_FLOAT with a value of 1 and LITTLE_ENDIAN with a value of -1.

-DSUPPORT_FLOAT=1 -DLITTLE_ENDIAN