Programming flash memory using the nios ii eds – Altera Cyclone V GT FPGA User Manual
Page 47

Appendix A: Programming the Flash Memory Device
A–3
Programming Flash Memory Using the Nios II EDS
September 2014
Altera Corporation
Cyclone V GT FPGA Development Kit
User Guide
After your design files are in the .flash format, use one of the following to write the
.flash
files to the user software locations of the flash memory:
■
Board Update Portal. Refer to
“Using the Board Update Portal to Write User
for more information.
■
Nios II EDS nios2-flash-programmer utility.
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 USB-Blaster 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
. If no output appears on the
LCD or if the Config Done LED (D7) does not illuminate, continue to step
the FPGA with a flash-writing design.
4. Run the Quartus II Programmer to configure the FPGA with a .sof capable of flash
programming. Refer to
“Restoring the MAX V CPLD to the Factory Settings” on
for more information.
5. Click Add File and select
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. On the Windows Start menu, click All Programs > Altera > Nios II EDS > Nios II
Command Shell
.
9. In the Nios II command shell, navigate to the
dir>\kits\cycloneVGT_5cgtfd9ef35_fpga\factory_recovery directory.
You can also navigate to the directory of the .flash files you created in
Flash Files Using the Nios II EDS” on page A–2
)
10. Type the following Nios II EDS command:
nios2-flash-programmer --base=0x00000000
r
11. After programming completes, if you have a software file to program, type the
following Nios II EDS command:
nios2-flash-programmer --base=0x00000000
r
12. Set the SW4.3 DIP switch to the FACT OFF (logic 1) position and power cycle the
board.
Programming the board is now complete.