Everything

 

-D


This option defines preprocessor macros and assembler symbols.

[Specification format]

-Dname[=def][,name[=def]]...

 

-

Interpretation when omitted

None

[Detailed description]

-

This option defines name as a preprocessor macro or user-defined symbol of the assembler.

-

This is equivalent to adding "#define name def" or "SET name def" (only assembly source program) at the beginning of the source program.

-

If name contains characters that are allowed in an assembler symbol, but which cannot be used in a preprocessor macro ("@", ".", and "~"), a warning will be output, and it is defined as an assembler symbol only.

-

This option can be used to redefine C language macros that have been defined already: __LINE__, __FILE__, __DATE__, __TIME__, and __CCRH__ (except for -D__CCRH__[=1]).
An error will occur if these are redefined when the input file is a C source file.

-

An error will occur if name is omitted.

-

If "=def" is omitted, def is regarded as 1.

-

This option can be specified more than once.

-

If both this option and -U option are specified for the same preprocessor macro and assembler symbol, the option specified last will be valid.

[Example of use]

-

To define "sample=256" as a preprocessor macro, describe as:

>ccrh -Dsample=256 -Xcommon=rh850 main.c