Programming flash memory using the nios ii eds – Altera Audio Video Development Kit, Stratix IV GX Edition User Manual
Page 53
Appendix A: Programming the Flash Memory Device
A–3
Programming Flash Memory Using the Board Update Portal
© November 2009 Altera Corporation
Audio Video Development Kit, Stratix IV GX Edition User Guide
Programming Flash Memory Using the Board Update Portal
Once you have the necessary .flash files, you can use the Board Update Portal to
reprogram the flash memory. Refer to
“Using the Board Update Portal to Update User
for more information.
1
If you have generated a .sof that operates without a software design file, you can still
use the Board Update Portal to upload your design. In this case, leave the Software
File Name
field blank.
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 S-Record File (.srec) to the
board using nios2-flash-programmer, perform the following steps:
1. Set the rotary switch (SW2) to the 0 position 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 8. If no output appears on the
LCD is seen or if the CONF DONE LED (D5) does not illuminate, continue to step
4 to load the FPGA with a flash-writing design.
4. Launch the Quartus II Programmer to configure the FPGA with a .sof capable of
flash programming. Refer to
“Configuring the FPGA Using the Quartus II
for more information.
5. Click Add File and select
dir>\kits\stratixIVGX_4sgx230_av\factory_recovery\s4gx230_av_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 CONF DONE LED (D5) and
the eight lower user LEDs (D16-D23) illuminate 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\stratixIVGX_4sgx230_av\factory_recovery directory (or to the
directory of the .flash files you created in
“Creating Flash Files Using the Nios II
) and type the following Nios II EDS command:
nios2-flash-programmer --base=0x08000000
r
10. After programming completes, if you have a software file to program, type the
following Nios II EDS command:
nios2-flash-programmer --base=0x0A000000
r
11. Set the rotary switch (SW2) to the 1 position and power cycle the board, or press
the CONFIGN button (S1) to load and run the user design.
Programming the board is now complete.