Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17046 Discussions

Error: Erase failed at offset 0,

Altera_Forum
Honored Contributor II
3,083 Views

Info: Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 

Info: Resetting and pausing target processor: OK 

Info: Reading System ID at address 0x00001828: verified 

Info: 

Info: : Checksumming existing contents 

Info: 

Info: 00000000 : Verifying existing contents 

Info: 

Info: 00000000 : Reading existing contents 

Info: 

Info: Checksummed/read 25kB in 10.1s 

Info: 

Info: 00000000 ( 0%): Erasing 

Info: 

Info: Erase failed at offset 0 

Info: Leaving target processor paused 

Error: Error code: 255 for command: bin/nios2-flash-programmer "E:/Verilog/LCM2/flash/LCM2_epcs.flash" --base=0x0 --epcs --sidp=0x1828 --id=0x0 --timestamp=1294660218 --device=1 --instance=0 '--cable=USB-Blaster on localhost [USB-0]' --program 

 

 

I tested USB-Blaster and byte Blaster,and changed EPCS4 and EPCS16.It's the same error.I googled ,no anwser. 

who can help me this problem, thank you! 

 

ps: run as H/W is OK.it's happened at download .elf file
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
1,950 Views

are you sure that the EPCS controller is at address 0x0 in your SOPC system?

0 Kudos
Altera_Forum
Honored Contributor II
1,950 Views

 

--- Quote Start ---  

are you sure that the EPCS controller is at address 0x0 in your SOPC system? 

--- Quote End ---  

 

 

 

Yes,EPCS address is locked at 0x0.And the reset is epcs,exception is SDRAM.
0 Kudos
Altera_Forum
Honored Contributor II
1,950 Views

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.

0 Kudos
Altera_Forum
Honored Contributor II
1,950 Views

 

--- 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 ---  

 

 

Thanks for your help. 

I solved the problem by changing the S/W version.Now it's working Ok. 

Maybe, 10.1 is unsteadable. Now I using version 9.0.My FPGA is EP2C5Q208.
0 Kudos
Altera_Forum
Honored Contributor II
1,950 Views

 

--- 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.
0 Kudos
Reply