22.3 Default Linker Script
For PIC32MX Devices Only:
If no linker script or alternative Device Family Pack (DFP) is specified on the command line, the linker will use an internal version known as the built-in default linker script. The default linker script has section mapping that is appropriate for all PIC32 MCUs. It uses an INCLUDE directive to include the device-specific memory regions.
--verbose
option:xc32-ld --verboseIn a normal tool-suite installation, a copy of the default linker script is located at
/pic32m/lib/ldscripts/pic32m.x. Note that this file is only a copy of the
default linker script. The script that the linker uses is internal to the linker.
The device-specific portion of the linker script is located in
xc32/<device>/procdefs.ld, where
<device> is the device value specified to the
-mprocessor compilation-driver (xc32-gcc) option.
For PIC32MZ and Later Devices:
The linker script for PIC32MZ devices are contained within a single file (for example,
xc32/<device>/p32MZ2064DAG176.ld). Like before, the
xc32-gcc compilation driver will pass the device-specific linker script to
the linker when building with -mprocessor option.
The default linker script contains the following categories of information:
- Output Format and Entry Points
- Default Values for Minimum Stack and Heap Sizes
- Processor Definitions Include File for PIC32MX Family
- Input/Output Section Map
