define symbol directive
Syntax
define [ exported ] symbolname=expr;
Parameters
| Exports the symbol to be usable by the executable image. |
| The name of the symbol. |
| The symbol value. |
Description
The define symbol directive defines a symbol with a specified value. The symbol can then be used in expressions in the configuration file. The symbols defined in this way work exactly like the symbols defined with the option ‑‑config_def outside of the configuration file.
The define exported symbol variant of this directive is a shortcut for using the directive define symbol in combination with the export symbol directive. On the command line this would require both a ‑‑config_def option and a ‑‑define_symbol option to achieve the same effect.
A symbol cannot be redefined
Symbols that are either prefixed by
_X, whereXis a capital letter, or that contain__(double underscore) are reserved for toolset vendors.The symbol value will be listed in the Address column of the entry list of the generated map file.
Example
/* Define the symbol my_symbol with the value 4 */
define symbol my_symbol = 4;See also
export directive and Interaction between ILINK and the application.