5.3.4.6 Why Would I Need to Place Data Into Its Own Section?

The MPLAB XC16 Object Linker will place data into sections efficiently. However, you may want to manually place groups of variables into sections because it is easier than manually placing each individual variable at a specific address. If necessary, absolute starting addresses may be specified in user-defined sections within the device linker script. To place data into its own section, you can use the section attribute, discussed in the following section in this user’s guide:

Variable Attributes

To edit user-defined sections within the linker script, see the following document. It is available for download from the Microchip Technology website, www.microchip.com.

“MPLAB® XC16 Assembler, Linker, and Utilities User's Guide” (DS50002106), Section 9.5 “Contents of a Linker Script”.