Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Store array of struct in NIOS

What is the best way to store variables (nonvolatile) on NIOS hardware? Can somebody give some examples to store a array of stuct's? On my hardware is a EEPROM (SPI) and flash.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Open the flash for reading/writing... just store them sequentially... if you aren't using the flash for anything else of course.

    You can use fseek and fread/fwrite to do your bidding. Don't forget to use fopen with the read/write binary flags.