10.3.2 Memory Region Information
The next section of a linker script defines the various memory regions for the target device using the MEMORY
command.
For the PIC32AK1216GC41064, several memory regions are defined:
/*
** Memory Regions
*/
MEMORY
{
data (a!xr) : ORIGIN = 0x4000, LENGTH = 0x4000
FCP : ORIGIN = 0x7F3000, LENGTH = 0x2
FICD : ORIGIN = 0x7F3010, LENGTH = 0x2
FDEVOPT : ORIGIN = 0x7F3020, LENGTH = 0x2
FWDT : ORIGIN = 0x7F3030, LENGTH = 0x2
FPR0CTRL : ORIGIN = 0x7F4000, LENGTH = 0x2
FPR0ST : ORIGIN = 0x7F4004, LENGTH = 0x2
FPR0END : ORIGIN = 0x7F4008, LENGTH = 0x2
FPR1CTRL : ORIGIN = 0x7F4010, LENGTH = 0x2
FPR1ST : ORIGIN = 0x7F4014, LENGTH = 0x2
FPR1END : ORIGIN = 0x7F4018, LENGTH = 0x2
FPR2CTRL : ORIGIN = 0x7F4020, LENGTH = 0x2
FPR2ST : ORIGIN = 0x7F4024, LENGTH = 0x2
FPR2END : ORIGIN = 0x7F4028, LENGTH = 0x2
FPR3CTRL : ORIGIN = 0x7F4030, LENGTH = 0x2
FPR3ST : ORIGIN = 0x7F4034, LENGTH = 0x2
FPR3END : ORIGIN = 0x7F4038, LENGTH = 0x2
FPR4CTRL : ORIGIN = 0x7F4040, LENGTH = 0x2
FPR4ST : ORIGIN = 0x7F4044, LENGTH = 0x2
FPR4END : ORIGIN = 0x7F4048, LENGTH = 0x2
FPR5CTRL : ORIGIN = 0x7F4050, LENGTH = 0x2
FPR5ST : ORIGIN = 0x7F4054, LENGTH = 0x2
FPR5END : ORIGIN = 0x7F4058, LENGTH = 0x2
FPR6CTRL : ORIGIN = 0x7F4060, LENGTH = 0x2
FPR6ST : ORIGIN = 0x7F4064, LENGTH = 0x2
FPR6END : ORIGIN = 0x7F4068, LENGTH = 0x2
FPR7CTRL : ORIGIN = 0x7F4070, LENGTH = 0x2
FPR7ST : ORIGIN = 0x7F4074, LENGTH = 0x2
FPR7END : ORIGIN = 0x7F4078, LENGTH = 0x2
FIRT : ORIGIN = 0x7F4080, LENGTH = 0x2
FSECDBG : ORIGIN = 0x7F4090, LENGTH = 0x2
FPED : ORIGIN = 0x7F40A0, LENGTH = 0x2
FEPUCB : ORIGIN = 0x7F40B0, LENGTH = 0x2
FWPUCB : ORIGIN = 0x7F40C0, LENGTH = 0x2
reset : ORIGIN = 0x800000, LENGTH = 0x4
program (xr) : ORIGIN = 0x800004, LENGTH = 0x1FFFC
}
Each memory region is range-checked as sections are added during the link process. If any region overflows, a link error is reported.
MEMORY
regions are shown below.