Hello,

today i was trying to create a persistent variable (A variable wich get not initialized on startup). I tried many ways like:

So the solution is the following declaration:

Explaination: The Attribute ‚persistent‘ marks the variable as persistant.
The section „.persist“ let the memory be saved in the persists section.

Should the section attribute not be enought?No, because its a special marked memory range which only stores persistent variables.
Now the map file looks how i want it to be 🙂

I’am using
XC32 v1.31
PIC32MX450F256L
MPLAB X IDE v2.10

I hope i could help someone with this 🙂