FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
All support for Intel NUC 7 - 13 systems has transitioned to ASUS. Read latest update.
5848 Discussions

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

wyue01
Beginner
645 Views

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

 

 

0 Kudos
1 Reply
Ahmed_H_Intel1
Employee
272 Views
Hi, Which flash device you are using. Altera has many examples of how to read/write flash device. Plus which board you are using? Please use the following link to find the required example that's suites your board and flash. https://fpgacloud.intel.com/devstore/platform/?search=flash&category=2&acds_version=any The examples have the How-to-use document, which will help you to understand the how to use/recreate the project. Regards,
0 Kudos
Reply