--- Quote Start ---
what FPGA are you using? If it can use a serial flash loader (SFL) design, then you could access the flash from the Quartus programmer without going through a NIOS system. That way you should be able to test the EPCS flash and know if the problem comes from the EPCS itself (or the connection between the EPCS and the FPGA) or from the NIOS/SOPC component.
--- Quote End ---
Hi,
I am having the same problem.
My objective: To build a customized boot loader. For that I am folowing "An-458 Alternative nios II boot methods". I am using advanced boot loader example where my boot loader stays in CFI and after reset tries to copy the boot record into onchip SRAM (small helloworld program provided with the AN).
System contents (slightly customized to avoid OpenCorePlus license):
nios2 processos -> Reset Vector -> ext_flash (base = 0x0, offset = 0x0)
-> exception vector -> sram (offset = 0x0)
Board : Cyclone III Dev, ep3c120
Altera : tried with both 9.1sp1 and 11.1sp2
error: (boot image)
bash-3.1$ nios2-flash-programmer --base=0x0 hello_world.flash --debug
Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Resetting and pausing target processor: OK
Found CFI table in 16 bit mode
Raw CFI query table read from device:
0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 51 00 52 00 59 00 02 00 00 00 40 00 00 00 00 00 Q.R.Y.....@.....
30: 00 00 00 00 00 00 27 00 36 00 00 00 00 00 07 00 ......'.6.......
40: 07 00 0A 00 00 00 03 00 05 00 04 00 00 00 1A 00 ................
CFI query table read from device:
10: 51 52 59 02 00 40 00 00 00 00 00 27 36 00 00 07 QRY..@.....'6...
20: 07 0A 00 03 05 04 00 1A 02 00 05 00 01 FF 01 00 ................
30: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
CFI extended table read from device:
0: 50 52 49 31 33 10 02 01 00 08 00 00 02 B5 C5 05 PRI13...........
10: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Device size is 64MByte
Erase regions are:
offset 0: 512 x 128K
Device supports AMD style programming algorithm
Multi-byte programming with 32 byte buffer
Sector erase timeout is 16s
Word program timeout is 1ms
Buffer program timeout is 4ms
: Checksumming existing contents
00240000 : Checksum failed - needs erase then program
00240000 : Reading existing contents
Checksummed/read 103kB in 2.5s
00240000 ( 0%): Erasing
Erased 128kB in 0.0s
00240000 ( 0%): Programming
Program failed
Leaving target processor paused
error: (boot loader)
bash-3.1$ nios2-flash-programmer --base=0x0 ext_flash.flash --debug
Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Resetting and pausing target processor: OK
Found CFI table in 16 bit mode
Raw CFI query table read from device:
0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 51 00 52 00 59 00 02 00 00 00 40 00 00 00 00 00 Q.R.Y.....@.....
30: 00 00 00 00 00 00 27 00 36 00 00 00 00 00 07 00 ......'.6.......
40: 07 00 0A 00 00 00 03 00 05 00 04 00 00 00 1A 00 ................
CFI query table read from device:
10: 51 52 59 02 00 40 00 00 00 00 00 27 36 00 00 07 QRY..@.....'6...
20: 07 0A 00 03 05 04 00 1A 02 00 05 00 01 FF 01 00 ................
30: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
CFI extended table read from device:
0: 50 52 49 31 33 10 02 01 00 08 00 00 02 B5 C5 05 PRI13...........
10: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Device size is 64MByte
Erase regions are:
offset 0: 512 x 128K
Device supports AMD style programming algorithm
Multi-byte programming with 32 byte buffer
Sector erase timeout is 16s
Word program timeout is 1ms
Buffer program timeout is 4ms
: Checksumming existing contents
00000000 : Checksum failed - needs erase then program
00000000 : Reading existing contents
Checksummed/read 126kB in 3.0s
00000000 ( 0%): Erasing
Erase failed at offset 0
Leaving target processor paused
I tried to use a stand alone "nios2-flash-programmer-gui" to convert some already IDE working program (reset vector in ext_flash) from ELF to FLASH. And tried to write flash. However, result was the same.
Any help, suggestion, links will be very helpful to me.
Thank you very much.