21.4 Default Linker Script
The command line always requires a linker script. However, if no linker
script is specified in an MPLAB X IDE project, the IDE will use the
device linker script file (device.gld
) included with the
compiler as the default linker script. This device-specific file contains information such
as:
- Memory region definitions
- Program, data and debug sections mapping
- Interrupt and alternate interrupt vector table maps
- SFR address equates
- Base addresses for various peripherals
Linker scripts may be found, by default, in:
<install-dir\support\DeviceFamily\gld
where DeviceFamily
is the DSC device family, such as dsPIC33F
.
To use a custom linker script in your project, simply add that file to the command line or the project in the “Linker Files” folder.