Hello all,
It seems we are having a similar problem using Quartus/Nios 6.1 with an EPCS64N and EP2C8Q208C7 and are getting the the following error using the command line tools to flash:
$ nios2-flash-programmer --debug --base=0x00001000 --epcs NAVCON.
flash
Reading override file "c:/altera/61/nios2eds/bin/nios2-flash-override.txt"
Using cable "USB-Blaster ", device 1, instance 0x00
Resetting and pausing target processor: OK
Processor data bus width is 32 bits
Looking for EPCS registers at address 0x00001000 (with 32bit alignment)
Initial values: 0001703A 04C00074 9801483A 9CFFF804 983FFD1E 0000203A
Not here: reserved fields are non-zero
Looking for EPCS registers at address 0x00001100 (with 32bit alignment)
Initial values: 92400237 4A40100C 483FFD26 90000135 92400237 4A40200C
Not here: reserved fields are non-zero
Looking for EPCS registers at address 0x00001200 (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
No EPCS layout data - looking for section
Unable to use EPCS device
Leaving target processor paused
Our epcs base address as reflected in the memory map in SOPC Builder is 0x00001000. We initially had a problem using the Flash Programmer in the Nios IDE and were getting an error that there was a problem with our 'target board'. We got this same error when using the Flash Programmer with the Nios II dev board and the standard.qpf example project. This led us to using the command line tools.
We have verified the hardware, checked that the D-clock looks good when in AS mode (although we are flashing in JTAG mode), checked the doc "Making use of the EPCS Configuration Device" at
http://www.fps-tech.net/docs/epcs-ug.pdf (
http://www.fps-tech.net/docs/epcs-ug.pdf) as well as the other relevant thread "Erasing/Programming EPCS via NIOS" at
http://forum.niosforum.com/forum/index.php?showtopic=3790 (
http://forum.niosforum.com/forum/index.php?showtopic=3790)
We are now assuming that we may have a problem with the RDID tag even though we are using an EPCS64N. Looking at the post in this thread concerning creating the nios2-flash-override.txt (originally from a .zip file from Altera), we assumed that to complete the table, it would look like the following:
# EPCS1N (lead-free)
sector_size = 32768
sector_count = 4
# EPCS4N (lead-free)
sector_size = 65536
sector_count = 8
# EPCS16N (lead-free)
sector_size = 65536
sector_count = 32
# EPCS64N (lead-free)
sector_size = 65536
sector_count = 128
This is a shot in the dark since we are guessing the RDID code. Altera's datasheet for the EPCS devices provides the 'sector_size' and 'sector_count' parameters. The datasheet does outline the bits used for the 'Silicon ID', but this is not consistent with the values in nios2-flash-override.txt for EPCS1N and EPCS4N. We tested this, with and without this file, as well as with and without the extra lines (most importantly for the EPCS64N), and had no success.
When running the memory test code in the Nios IDE (from SDRAM) to verify the EPCS, we get the following:
Enter the name of the EPCS flash device to be opened,
or just press <enter> to open "/dev/epcs_controller")
>epcs_controller
-ERROR: Could not open epcs_controller
Press enter to continue...
We are assuming that the name to be specified here is the same as is shown in the SOPC Builder. We verified the syntax of this name by checking the .ptf. Is this assumption correct?
Also, (not sure if this is relevant) we had a problem when adding an epcs controller in SOPC Builder which gave us an error that there was "No reference designator specified for module epcs_controller". On the Flash Memory tab in the Board Description Editor, we have specified that we are only using the EPCS controller and a hardware image associated with it. We found a thread that suggested a fix that involved manually editing the class.ptf file associated with our board description by adding parentheses after the CLASS name as well as filling in empty fields for the instance designator values. In our case the empty values were for a CFI Interface (which we don't have on our board or in SOPC Builder). This fix did not work for us.
We found that if we removed the epcs_controller from SOPC Builder, re-generated, then added the epcs_controller back in, then re-generated again, this worked.
Any advice anyone? Thanks in advance
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif