I'm having a go at programming a PIC24EP512GP806 bootloader with XC16. I need to define a few constants that the bootloader and application can both read.

Here's what I've got so far
Code:
const word __attribute__ ((space(auto_psv), address(0x7fc000))) DEVICE_TYPE = 0x0001;
const word __attribute__ ((space(auto_psv), address(0x7fc002))) VERSION_MAJOR = 0x0001;
const word __attribute__ ((space(auto_psv), address(0x7fc004))) VERSION_MINOR = 0x0000;
const word __attribute__ ((space(auto_psv), address(0x7fc006))) VERSION_REVISION = 0x0000;
This actually seems to work but the compiler spits out a warning for every constant and every place I reference one of them.
Code:
src/main.c:35:65: warning: DEVICE_TYPE Ignoring space(auto_psv) attribute due to address(); assuming space(psv) for 'DEVICE_TYPE'.
If I change auto_psv to psv then the warnings go away but the code no longer reads the correct value.
I assume this is because the compiler is no longer setting the PSVPAG register before reading the constants and I can't see any way to set it manually without dropping into ASM. (PSVPAG isn't a valid variable)

Am I doing something wrong? I've tried Googling and reading the XC16 manual but this was the best I could come up with.

So far I'm only working on the bootloader code. How would I reference the constants in the application? Do I just need the same definitions but starting with "extern" and no value specified?