Forum Discussion

wyue01's avatar
wyue01
Icon for New Contributor rankNew Contributor
6 years ago

How to read from a Flash and write back to it with Nios Command Shell?

According to the ug_nios2_flash_programmer.pdf,

I have read the data(current.srec) from flash.

And then I want to ​ write the current.srec back to flash.

while the ug_nios2_flash_programmer.pdf says, when program a flash, I need a .flash file.

Is it necessary to convert the .srec file to .flash file?

if it is necessary, could you give me a sample(command)?

Or any other way to read from a Flash and write back to it?

-------------------------------------------------------------------------

ug_nios2_flash_programmer.pdf

①Commands of reading CFI flash memory

quartus_pgm --nios2 --base=0x200000 --read=current.srec \ --readbytes=0,0x10000

②Commands of Programming CFI flash memory

quartus_pgm --nios2 --cable="Usb-blaster [USB-0]" --base=0x200000\ --program ext_flash.flash

1 Reply