18.2.16 Symbols Required by Start-Up Code and C/C++ Library

This section details the symbols that are required by the start-up code and C/C++ library. Currently the default device-specific linker script defines these symbols. If an application provides a custom linker script, the user must ensure that all of the following symbols are provided in order for the start-up code and C library to function:

Symbol Name Description
_bmxdkpba_address The address to place into the BMXDKPBA register if _ramfunc_length is greater than 0.
_bmxdudba_address The address to place into the BMXDUDBA register if _ramfunc_length is greater than 0.
_bmxdupba_address The address to place into the BMXDUPBA register if _ramfunc_length is greater than 0.
_ebase_address The initialization value for the ExceptionBase field of the EBASE register. The ExceptionBase is the base address for the exception vectors, adjustable to a resolution of 4 Kbytes. The default device-specific linker scripts provided with the XC32 toolchain provide a default location for the ExceptionBase.
_end The end of data allocation.
_gp Points to the “middle” of the small variables region. By convention this is 0x8000 bytes from the first location used for small variables.
_heap The starting location of the heap in DRM.
_ramfunc_begin The starting location of the RAM functions. This should be located at a 2K boundary as it is used to initialize the BMXDKPBA register.
_ramfunc_length The length of the .ramfunc section.
_stack The starting location of the stack in DRM. Remember that the stack grows from the bottom of data memory so this symbol should point to the bottom of the section allocated for the stack.
_vector_spacing The initialization value for the vector spacing field in the IntCtl register.