Forum Discussion

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

Programming NIOS II code to EPCQ in Quartus 13.1

Hello

I'm having trouble with NIOS II code executing from an EPCQ x4 flash chip (p/n Micron N25Q256A) after a power cycle. I've followed the following guideleins to boot from EPCQ or EPCS (from Altera rd11192013_118):

http://www.altera.com.cn/support/kdb/solutions/rd11192013_118.html

I have taken the following steps (in order). According to Altera, steps 6-15 would be required *each* time I make a change to either hardware OR software and I want to program to non-volatile memory (i.e. when I do not want a JTAG cable connected to hardware). This is very time consuming. Am I missing something fundamental?

1. Added lines STRATIXV_CONFIGURATION_SCHEME "ACTIVE SERIAL X1" and ENABLE_INIT_DONE_OUTPUT ON to project qsf

2. Deleted db and incremental db in project directory

3. Pointed the reset vector of NIOS to an EPCS/EPCQ controller (connected in Qsys, with a locked base address of 0x00)

4. Pointed the exception vector to on-chip-memory

5. Generated Qsys design

6. Compiled in Quartus II

7. Converted programming file from sof to jic, specified active serial x4, added the correct p/n for the flash loader, and turned on compression (as requested by solution document)

8. Generated a jic

9. Successfully programmed and verified EPCQ

10. Power cycled - I have an LED turn on when the FPGA configures, and this LED turned on

11. Generated flash files for hardware with sof2flash --input=hw.sof --output=hw.flash -epcq --verbose

12. Generated flash file for software with elf2flash --input=sw.elf --output=sw.flash --epcs --after=hw.flash --verbose (this is supposed to be "epcs" even though the chip is "epcq")

13. Used nios2-configure-sof (command line programmer) to configure FPGA with hw.sof

14. programmed the device using the Nios II flash programmer using nios2-flash-programmer --epcs --base=0x00 hw.flash (the epcq needs to be programmed with the .flash file even if it had been programmed with quartus programmer earlier in .jic format)

15. nios2-flash-programmer --epcs --base=0x00 sw.flash

I have another blinking LED running in main() in my Nios C code. After running nios2-flash-programmer, the processor enters reset and the LEDs blink.

However, after a power cycle, all pins are in tri-state and neither the FPGA nor the Nios processor will configure.

Am I missing something?

19 Replies