1.4 List of Interesting Symbols

For a list of assembler and linker symbols, see “MPLAB® XC-DSC Assembler, Linker and Utilities User’s Guide for dsPIC33C/E/F and dsPIC30 DSC” (DS-50003590), “Lists of Interesting Symbols.”

Table 1-2. Compiler Symbols
SymbolDescriptionMore Information

C30

This symbol is defined when -ansi is not selected.

XC-DSC compiler is in use.

20.3.3 Compiler Output Type Macros

__C30

or

__C30__

These symbols are defined with the -ansi command line option.

If defined, XC-DSC compiler is in use.

20.3.3 Compiler Output Type Macros

__C30ELF

or

__C30ELF__

These symbols are defined with the -ansi command line option.

If defined, compiler is producing ELF output.

20.3.3 Compiler Output Type Macros
__DATE__Current date as a C string20.3.6 Other Macros

dsPIC30

This symbol is defined when -ansi is not selected.

XC-DSC compiler is in use.

20.3.3 Compiler Output Type Macros

__dsPIC30ELF

or

__dsPIC30ELF__

These symbols are defined with the -ansi command line option.

If defined, compiler is producing ELF output.

20.3.3 Compiler Output Type Macros

__dsPIC30F__ or

__dsPIC33F__ or

__dsPIC33E__ or

__dsPIC33C__

Once the compiler defines a symbol based on the target device set with -mcpu=, it also defines a symbol based on the target device family.

20.3.4 Device Name and Family (Architecture) Macros

__dsPICC30

or

__dsPICC30__

These symbols are defined with the -ansi command line option.

If defined, XC-DSC compiler is in use.

20.3.3 Compiler Output Type Macros
__dsPIC3xxxxxx__

The compiler defines a symbol based on the target device set with -mcpu=. For example, -mcpu=30F6014, which defines the symbol __dsPIC30F6014__.

20.3.4 Device Name and Family (Architecture) Macros
__FILE__Current file name as a C string20.3.6 Other Macros
__HAS_5VOLTS__

Device is a 5-volt device.

If device feature is enabled, the symbol is defined.

20.3.5 Device Features Macros
__HAS_AUXFLASH__

Device has auxiliary Flash.

If device feature is enabled, the symbol is defined.

20.3.5 Device Features Macros
__HAS_CODEGUARD__

Device has CodeGuard Security.

If device feature is enabled, the symbol is defined.

20.3.5 Device Features Macros
__HAS_DMA__

Device has a DMA controller.

If device feature is enabled, the symbol is defined.

This is a generic macro which is set if any DMA controller is present. This DOES NOT indicate that DMA memory is present. To determine if there is any DMA memory, use the __DMA_BASE or __DMA_LENGTH manifest constants which should be defined the device header file.

20.3.5 Device Features Macros
__HAS_DMAV2__

Device has a DMA V2 controller.

If device feature is enabled, the symbol is defined.

This macro is set if a DMA V2 controller is present. This DOES NOT indicate that DMA memory is present. To determine if there is any DMA memory, use the __DMA_BASE or __DMA_LENGTH manifest constants which should be defined the device header file.

20.3.5 Device Features Macros
__HAS_DSP__

Device has a DSP engine.

If device feature is enabled, the symbol is defined.

20.3.5 Device Features Macros
__HAS_EDS__

Device has Extended Data Space.

If device feature is enabled, the symbol is defined.

20.3.5 Device Features Macros
__HAS_EEDATA__

Device has EEPROM data (EEData) memory.

If device feature is enabled, the symbol is defined.

20.3.5 Device Features Macros
__HAS_PMP__

Device has Parallel Master Port.

If device feature is enabled, the symbol is defined.

20.3.5 Device Features Macros
__HAS_PMPV2__

Device has Parallel Master Port V2.

If device feature is enabled, the symbol is defined.

20.3.5 Device Features Macros

__LARGE_ARRAYS__

Set to 1 for -menable-large-arrays, set to 0 otherwise.

20.3.2 Compiler Settings Macro
__LINE__Current line number as a decimal integer20.3.6 Other Macros

__OPTIMIZATION_LEVEL__

Set to the value of the big O number. For example, both -Os and -O2 would be set to 2.

20.3.2 Compiler Settings Macro

__OPTIMIZE_SIZE__

Defined if -Os enabled, undefined otherwise.

20.3.2 Compiler Settings Macro

__reset

The linker scripts construct a GOTO __reset instruction at location 0 in program memory, which transfers control upon device Reset.

See the “MPLAB® XC-DSC Assembler, Linker and Utilities User’s Guide for dsPIC33C/E/F and dsPIC30 DSC” (DS-50003590), “Lists of Interesting Symbols.”

__SP_init

__SPLIM_init

The linker will allocate an appropriately sized section and initialize __SP_init and __SPLIM_init so that the run-time startup code can properly initialize the stack.

7.3 Stack

11.2.3.1 Software Stack

XC_DSC

This symbol is defined when -ansi is not selected.

XC-DSC compiler is in use.

20.3.3 Compiler Output Type Macros

__XC_DSC

or

__XC_DSC__

These symbols are defined with the -ansi command line option.

If defined, XC-DSC compiler is in use.

20.3.3 Compiler Output Type Macros

__XC_DSCELF

or

__XC_DSCELF__

These symbols are defined with the -ansi command line option.

If defined, compiler is producing ELF output.

20.3.3 Compiler Output Type Macros

__XC_DSC_VERSION__

The compiler will define this constant, giving a numeric value to the version identifier.

20.3.1 Compiler Version Macro