10.6 Application-Defined Memory Regions
On occasion, an application may require a new memory region that was not defined in the default device-specific linker scripts. One such case may be when using external memory connected to the External Bus Interface (EBI) on a PIC32MZ target device.
One way to handle adding a new memory region would be to create a custom linker script, add the new memory region, and explicitly map your sections to the new region. Another way to add a new memory region would be to add an application-defined memory region to your C/C++ source code. Some applications may even choose to combine a custom linker script and an application-defined memory region.