Forum Discussion
2 Replies
- Altera_Forum
Honored Contributor
I suggest reading the section on using Flash Devices in the Software Developers Handbook. There are API calls to get you the number and size of blocks, and for erasing them.
- Altera_Forum
Honored Contributor
If you want to wipe out the entire flash you can use this command as well (from the SDK shell):
nios2-flash-programmer --sof=$SOPC_KIT_NIOS2/components/<flash target board directory>/system/<flash target hardware sof> --erase --cable=<Cable Name> --base=<Flash Target> For this you need to find out what the flash target base address is (easiest way to find out is to flash program your board and watch the command lines going by to find out what this value is). This command line program is documented in the Flash programmer guide (which includes what the value <Flash Target> is I believe).