Where Am I Allowed To Manually Link Psects?

It is recommended that the linker options for compiler-generated psects (sections) are not modified. If these must be changed or if there are user-defined psects that need special allocation, there might be device- or compiler-imposed restrictions on where these can be placed in memory.

Try to link psects in a suitable compiler linker class (as shown in Default Linker Classes) as the definitions for these memory ranges take into consideration any restrictions. Define your own linker class, if necessary (see How Do I Position A Variable Into An Address Range?). Refer to Compiler-Generated Psects to see the memory placement restrictions that apply to compiler-generated psects which hold similar content to your psect.

Most limitations relate to psects straddling some memory boundary, such as a data bank or program memory page. One typical limitation is that all psects holding executable code cannot straddle a device page boundary. Compiler-generated psects holding variables must also be typically linked within the data bank for which they were created. These boundaries, therefore, impose limits on the size to which the psect can grow.