The linker is moving my code around based on this variable: const BYTE EEPowerUp @ 0x0080;//0x0fc0;
Consequently I can not place my flash variables in "unused" areas of flash because no matter where I put them, other code is placed into the same block. Then when I call flash_writeBlock(), my chip gets corrupted.
The expected behavior is to find a block of flash that is not being used, and then place up to 64 bytes of storage there, and the code stays where it was.