Hi,
It seems there is a bug using the "persistent" attribute in C++. Internally, the compiler validates the attribute and emits that warning before the initializer has been parsed.
The attribute works fine in a C program.
As a work-around I would suggest explicitly putting the variable in the ".persistent" section, this has the same effect as the "persistent" attribute.
unsigned long int __attribute__((section(".persistent"))) FRAM_count = 5;
Apologies that this bug caused confusion!
Regards,
Jozef