Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Store array of struct in NIOS

Altera_Forum
Honored Contributor II
1,046 Views

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.

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
302 Views

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.
0 Kudos
Reply