This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to create persistent variable?

I want to keep the value of the variable even if there is power interruption or reset in the system. That's why I want to create persistent variable in main. Do I need to use pstorage for this, or can I define a custom global variable like persistent as in C?

Related