Forum Discussion

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

Flash issues

Hi.

Is there a proper guide that explains how to flash the configuration memory with both hardware and software?

Nios II Flash Programmer User Guide 2.2 seems to be outdated.

I hope someone here has the knowledge to help me.

(I'm using Quartus 14.0 and a DE0-NANO board.)

It is not easy to find any answer on this forum. All I see is others having trouble and no clear solutions :(

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Your question is not very clear...

    The de0-nano user guide (https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/ug/de0_nano_user_manual_v1.9.pdf) explains how to configure the configuration EPCS (FLASH) by use of a '.jic' file. See page 11.

    However, I suspect you wish to access the FLASH from software running on a Nios. In which case I suggest you look at the 'DE0_Nano_QSYS_DEMO' that comes with the board. This example shows how to instantiate the EPCS (FLASH) interface in QSYS. It also includes sample C code to run on the hardware and includes some, albeit basic, functions to report the size of the FLASH.

    The EPCS is mapped into the Nios' address space. So, you can access it using the standard IOWR & IORD built in Nios commands.

    Cheers,

    Alex
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    After compiling your program...

    1. Connect PC USB to DE0-nano mini-USB

    2. File / Open project...

    3. File / Convert Programming Files

    4. Click 'Open Conversion Setup Data...'

    5. Select 'xxxx.cof' file

    6. Click 'Generate' and close when done

    7. Tools / Programmer

    8. Click 'Hardware Setup...'

    9. Select 'USB-Blaster', click 'Close'

    10. Set 'Mode:' to 'JTAG'

    11. Click 'Delete' to clear any files or devices

    12. Select 'xxxx.jic' file from the 'output_files' directory

    13. Check'Program/Configure' box

    14. Click 'Start' to begin programming (takes a few minutes)

    15. Unplug and replug the USB cable to cycle power (loads new configuration)

    Note: No external power supply should be used when performing the above as it will conflict with USB supplied power.