22.4 Default Linker Script
The command line always requires a linker script. However, if no linker
script is specified in an MPLAB 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 16-bit device family,
such as dsPIC30F
.
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.