Microchip Technology SW006023-2N Data Sheet
MPLAB
®
XC32 C/C++ Compiler User’s Guide
DS51686E-page 178
2012 Microchip Technology Inc.
17.4.3.2
OPTIONAL INCLUSION OF PROCESSOR-SPECIFIC PERIPHERAL
LIBRARIES
LIBRARIES
This section of the processor definitions linker script ensures that the
processor-specific peripheral libraries get included, but only if the files exist.
processor-specific peripheral libraries get included, but only if the files exist.
/*********************************************************************
* Processor-specific peripheral libraries are optional
*********************************************************************/
OPTIONAL("libmchp_peripheral.a")
OPTIONAL("libmchp_peripheral_32MX795F512L.a")
The OPTIONAL lines specify that libmchp_peripheral.a and
libmchp_peripheral_32MX795F512L.a
libmchp_peripheral_32MX795F512L.a
should be included in the link as if the
files were named on the command line. The linker attempts to find these files in the cur-
rent directory. If they are not found in the current directory, the linker searches through
the library search paths. If they are not found in the library search paths, the link pro-
cess continues without error. The linker will error only when a symbol from the periph-
eral library is required but not found elsewhere.
rent directory. If they are not found in the current directory, the linker searches through
the library search paths. If they are not found in the library search paths, the link pro-
cess continues without error. The linker will error only when a symbol from the periph-
eral library is required but not found elsewhere.
17.4.3.3
BASE EXCEPTION VECTOR ADDRESS AND VECTOR SPACING
SYMBOLS
SYMBOLS
This section of the processor definitions linker script defines values for the base
exception vector address and vector spacing.
exception vector address and vector spacing.
/**************************************************************
* For interrupt vector handling
**************************************************************/
_vector_spacing= 0x00000001;
_ebase_address= 0x9FC01000;
The first line defines a value of 1 for _vector_spacing. The available memory for
exceptions only supports a vector spacing of 1. The second line defines the location of
the base exception vector address (EBASE).
exceptions only supports a vector spacing of 1. The second line defines the location of
the base exception vector address (EBASE).
On some devices, the base exception vector address is located in the KSEG0 boot
segment. On other devices, the size of the KSEG0 boot segment is not sufficient for
the vector table, so the base exception vector address is located in the KSEG0 program
segment. In general, devices with at least 12 KB in the KSEG0 boot segment use the
boot flash for the exception vector table. Devices with less than 12 KB in the KSEG0
boot segment use the KSEG0 program segment for the exception vector table. Be sure
to check the procdefs.ld include file for the default address for your target device.
segment. On other devices, the size of the KSEG0 boot segment is not sufficient for
the vector table, so the base exception vector address is located in the KSEG0 program
segment. In general, devices with at least 12 KB in the KSEG0 boot segment use the
boot flash for the exception vector table. Devices with less than 12 KB in the KSEG0
boot segment use the KSEG0 program segment for the exception vector table. Be sure
to check the procdefs.ld include file for the default address for your target device.