I am trying to place an array at the highest location in auxiliary memory on a PIC24EP256G810 processor using the Microchip C30 compiler. The array is defined as follows:
const int __attribute__((space(auxflash), aligned(2048))) AuxFlashRows[8][128]
{
{
0x0000,etc,etc
},
{
0x0000,etc,etc
},
etc
};
The code above will place the data in the auxiliary memory space, but I am unsure how to make the compiler place it at the highest location. Just now it puts the array in a location occupied by the bootloader.
Thanks
You shouldn’t need to modify the linker script. You should just have to add the address() keyword in your attribute modifier, in addition to space() and aligned(), and hard-code the address you want. It’s documented in section 2.3.1 in my version of the C30 User’s Guide, but either way you could just search the “attribute“, where they are all documented together. (Sorry, the form is eating my underscores 🙂