I've defined a persistent variable in my code using the __attribute__((persistent)) directive. In the code I initialize the variable count to zero. It compiles and it's value persists across power loss as I would expect but count's initial value after flashing the device is 0xFF and not zero. It doesn't matter what I set the initial value to in the code it always ends up as 0xFF. I'm using the GCC compiler and MSPFlasher on linux. Any suggestions as to what is causing the initial value to be wrong?
__attribute__ ((persistent)) uint8_t count = 0;