Forum Discussion

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

Flash programmer

Hi

I am using nios2-flash-programmer from the command line to program CFI flash on my board. Having programmed the Flash the verify fails. See the log below.

[SOPC Builder]$ nios2-flash-programmer --base=0 ext_flash.flash

Using cable "USB-Blaster [USB-0]", device 1, instance 0x02

Resetting and pausing target processor: OK

Checksummed/read 161kB in 4.5s

Erase not required

Programmed 161KB in 0.0s

No change to device contents

Leaving target processor paused

/cygdrive/c/development/mda072/SVNOut/Install_Package

[SOPC Builder]$ nios2-flash-programmer --base=0 --verify ext_flash.flash

Using cable "USB-Blaster [USB-0]", device 1, instance 0x02

Resetting and pausing target processor: OK

Verifying 00000000 ( 0%)Failed to verify at around 00000000

Verify failed

Leaving target processor paused

/cygdrive/c/development/mda072/SVNOut/Install_Package

[SOPC Builder]$

As you can see when I try and program the unit it reads the flash data back and decides it doesn't need programming because the code hasn't changed. However when I run with the --verify option the verify fails. What is going on? When I read the contents back with the --read and --read-bytes options the s-record file uses S1 and S2 records in the .flash file whereas elf2flash uses S3 records. This means I can't just diff the files. Nevertheless as far as I can see the data read back is the same as that written.

Mike
No RepliesBe the first to reply