7.2.3 Compile Time Memory Information

Each device header file incorporates macros to help identify memory sizes. For each memory region (RAM, Flash, vector table, configuration words, etc.) the header file will define two symbols: a base address and a length in bytes.

The symbol name is formed from the following template: __<region_id>_BASE or __<region_id>_LENGTH. These symbols may be used anywhere that preprocessing symbols are used.

For example:

   #if __DATA_LENGTH < 0x1000
   #error Please use a device with at least 4K of data memory
   #endif