Using macros and variables

The diagram properties tab allows you to define macros and variables for your program.
  1. Click anywhere on the white canvas. The diagram properties appear in the corner.
  2. Choose the Defines section. Click the add button to define a macro used in the program. The compiler will substitute token-string for each occurrence of the macro identifier in the source file.

    properties

    • Name - The macro identifier. The Name must be a valid C identifier, must be unique and can't exceed 63 characters.
    • Value - The macro token-string. Do not use variables defined in the Variables section.
  3. Choose the Variables section. Click the add button to set a variable used in the program.

    properties

    • Name - The variable name. The name must be a valid C identifier, must be unique and can't exceed 63 characters.
    • Value - The initialization value of the variable.
    • Qualifier - A C-type qualifier, e.g. const, extern, static, etc. More than one can be used.
    • Cpu Type - The variable data type. It will be transformed to a C-data type. The following types are available:
      • uchar
      • char
      • ushort
      • short
      • uint
      • int
      • float
      • double
    • Init Here - This option is not used.