Cyclone® V GT FPGA Development Kit User Guide

ID 792833
Date 2/21/2024
Public
Document Table of Contents

A.5. Programming Flash Memory Using the Nios® II EDS

The Nios® II EDS offers a nios2-flash-programmer utility to program the flash memory directly. To program the .flash files or any compatible .srec file to the board using nios2-flash-programmer, do the following:

  1. Set the SW4.3 DIP switch to the FACT ON (logic 0) to load the Board Update Portal design from flash memory on power up.
  2. Attach the Intel® FPGA Download Cable and power up the board.
  3. If the board has powered up and the LCD displays either Connecting...or a valid IP address (such as 152.198.231.75), proceed to step 8. If no output appears on the LCD or if the Config Done LED (D7) does not illuminate, continue to step 4 to load the FPGA with a flash-writing design.
  4. Run the Intel® Quartus® Prime Programmer to configure the FPGA with a .sof capable of flash programming. Refer to Restoring the MAX® V CPLD to the Factory Settings for more information.
  5. Click Add File and select <install dir>\kits\cycloneVGT_5cgtfd9ef35_fpga\factory_recovery\c5gt_fpga_bup.sof.
  6. Turn on the Program/Configure option for the added file.
  7. Click Start to download the selected configuration file to the FPGA. Configuration is complete when the progress bar reaches 100%. The Config Done LED (D7) illuminates indicating that the flash device is ready for programming.
  8. In the Nios® II command shell, navigate to the <install dir>\kits\cycloneVGT_5cgtfd9ef35_fpga\factory_recovery directory.

    You can also navigate to the directory of the .flash files you created in Creating Flash Files Using the Nios® II EDS.

  9. Type the following Nios® II EDS command:
    nios2-flash-programmer --base=0x00000000 <yourfile>_hw.flash
  10. After programming completes, if you have a software file to program, type the following Nios® II EDS command:
    nios2-flash-programmer --base=0x00000000 <yourfile>_sw.flash
  11. Set the SW4.3 DIP switch to the FACT OFF (logic 1) position and power cycle the board.

Programming the board is now complete.

To restore flash memory, refer to Restoring the Flash Device to the Factory Settings.

For more information about the nios2-flash-programmer utility, refer to the Nios® II Flash Programmer User Guide.