Hi, I added the next lines to the nios2-flash-override.txt file:
[EPCS-FF]# EPCS64N(lead-free)
sector_size = 65536
sector_count = 128
Now I tried to erase all the EPCS memory, using the respective command, but took almost an hour for an EPCS64 memory:
Now I am trying to program it with first the sof file converted to .flash: This is the output:
$ nios2-flash-programmer --epcs --base=0x21400 hw.flash --debug
Reading override file "C:/altera/14.0/nios2eds/bin/nios2-flash-override.txt"
Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Resetting and pausing target processor: OK
Processor data bus width is 32 bits
Looking for EPCS registers at address 0x00021400 (with 32bit alignment)
Initial values: 00000000 00000000 00000260 00000000 00000000 00000001
Valid registers found
EPCS signature is 0xFF
EPCS device doesn't support RDID command
Using EPCS size information from section [EPCS-FF]
Device size is 8MByte (64Mbit)
Erase regions are:
offset 0: 128 x 64K
EPCS status is 0xFF
: Checksumming existing contents
00000000 : Verifying existing contents
00000000 : Needs erase then program
00010000 : Verifying existing contents
00010000 : Needs erase then program
00020000 : Verifying existing contents
00020000 : Needs erase then program
00030000 : Verifying existing contents
00030000 : Needs erase then program
00040000 : Verifying existing contents
00040000 : Needs erase then program
00050000 : Verifying existing contents
00050000 : Needs erase then program
00060000 : Verifying existing contents
00060000 : Needs erase then program
00070000 : Verifying existing contents
00070000 : Needs erase then program
00080000 : Verifying existing contents
00080000 : Needs erase then program
00090000 : Verifying existing contents
00090000 : Needs erase then program
000A0000 : Verifying existing contents
000A0000 : Needs erase then program
000B0000 : Verifying existing contents
000B0000 : Needs erase then program
000C0000 : Verifying existing contents
000C0000 : Needs erase then program
000D0000 : Verifying existing contents
000D0000 : Needs erase then program
000E0000 : Verifying existing contents
000E0000 : Needs erase then program
000F0000 : Verifying existing contents
000F0000 : Needs erase then program
00100000 : Verifying existing contents
00100000 : Needs erase then program
00000000 : Reading existing contents
00010000 : Reading existing contents
00020000 : Reading existing contents
00030000 : Reading existing contents
00040000 : Reading existing contents
00050000 : Reading existing contents
00060000 : Reading existing contents
00070000 : Reading existing contents
00080000 : Reading existing contents
00090000 : Reading existing contents
000A0000 : Reading existing contents
000B0000 : Reading existing contents
000C0000 : Reading existing contents
000D0000 : Reading existing contents
000E0000 : Reading existing contents
000F0000 : Reading existing contents
00100000 : Reading existing contents
Checksummed/read 15kB in 510.3s
00000000 ( 0%): Erasing
00010000 ( 5%): Erasing
00020000 (11%): Erasing
00030000 (17%): Erasing
00040000 (23%): Erasing
00050000 (29%): Erasing
00060000 (35%): Erasing
00070000 (41%): Erasing
00080000 (47%): Erasing
00090000 (52%): Erasing
000A0000 (58%): Erasing
I guess that the 0x400 offset is due the CycloneIV bootloader, which has 1024 bytes of content. I do not know why took a lot of time to program and erase the memory. Also in one opportunity I guess that the programming was frozen because never pass the 0%.