What happens to persistent mem on prog load

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

What happens to persistent mem on prog load

Post by FFMan »

If when I mod code it ends up a different size to before, does the persistent memory location (and hence any stored values) get effectively lost, or is persistent memory in a fixed area.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: What happens to persistent mem on prog load

Post by dkinzer »

FFMan wrote:If when I mod code it ends up a different size to before, does the persistent memory location get effectively lost, or is persistent memory in a fixed area.
Inasmuch as Persistent Memory (EEPROM on the AVR chip) and Program Memory (Flash memory on the AVR) are completely separate memory spaces, a change in code size has no effect on the address of a given Persistent Memory variable. The only thing that affects the allocation of Persistent Memory is the type, number and sizes (for arrays) of Persistent Memory variables.

For further information and advice relating to adding new Persistent variables, see the ZBasic Language Reference Manual section discussing Persistent Variables.
- Don Kinzer
FFMan
Posts: 502
Joined: 09 January 2010, 12:52 PM

Post by FFMan »

as it hought - but i have now found the bug that made me question what I knew
Post Reply