Home AMX User Forum AMXForums Archive Threads AMX Hardware

Need more NV memory

How do I free up some NVmem on a duet master if I'm not using the duet side?

Comments

  • PhreaKPhreaK Posts: 966
    If you don't explicity specify non volatile/volatile/persistant any variable you declare will default to non volatile. Any variables that you're using that don't need to survive a reboot can be specified as non volatile:
    VOLATILE INTEGAR x
    

    If you've got a lot that is required to be non volatile downsize their types to only use the max number of bytes you need. For example, if you're storing boolean values, only use a char rather than an int etc.
  • PhreaK wrote: »
    If you don't explicity specify non volatile/volatile/persistant any variable you declare will default to non volatile. Any variables that you're using that don't need to survive a reboot can be specified as non volatile:
    VOLATILE INTEGAR x
    

    If you've got a lot that is required to be non volatile downsize their types to only use the max number of bytes you need. For example, if you're storing boolean values, only use a char rather than an int etc.

    That helped but I'm still over:

    Volatile Free : 41777544/67108864 (largest free block in bytes/max physical)
    NonVolatile Free: -343856/523248 (program exceeded amount of NV memory)
    Disk Free : 24342528/31715328 (bytes of free space/max physical)
    Duet Memory Free : 0 (bytes)
    Partition 1 - <UNKNOWN>
    Partition 2 - <UNKNOWN>

    Suggestions?
  • Save the data to the compact flash and reload the data at each reboot?

    Kevin D.
  • DHawthorneDHawthorne Posts: 4,584
    Check your modules, at least the ones you have access to the source code. Could be a lot of nonvolatile variables in those too.

    I explicitly set everything to volatile unless it absolutely needs to be otherwise ... and I have found very few do. In fact, I generally wind up with a small amount of persistent, but never leave anything non-volatile at all.
Sign In or Register to comment.