Syntax
-D
name
-D
name
=
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:
- Select the project in the Project Explorer.
- In the Preprocessor Options group edit the Preprocessor Definitions property.
To define symbols for a particular file:
- Select the file in the Project Explorer.
- In the Preprocessor Options group edit the Preprocessor Definitions property.
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