Parallel flash loader, Custom user design, Creating flash files using the nios ii eds – Altera Transceiver Signal Integrity User Manual

Page 28

Advertising
background image

A–2

Appendix A: Programming the Flash Device

Parallel Flash Loader

Transceiver Signal Integrity Development Kit,

December 2011

Altera Corporation

Stratix IV GX Edition User Guide

Parallel Flash Loader

The development kit features a MAX II configuration design in the <install
dir
>\kits\stratixIVGX_4sgx230_si\examples\maxII_epm1270_si directory that
includes a PFL megafunction. The Parallel Flash Loader (PFL) on the MAX II device is
used to configure from CFI flash when the RESET SW8 is pressed or the board is
powered up.

f

For more information about the PFL megafunction, refer to

AN 386: Using the Parallel

Flash Loader with the Quartus II Software

.

Custom User Design

As you develop your own project using the Altera tools, you may wish to program the
flash device so that, upon power up, it loads the FPGA with your own user design.
With the Nios II EDS tool sof2flash, your Quartus II compiled .sof can be converted to
a .flash file. The .flash file can then be written to the user hardware location of the
flash memory using either the Board Update Portal or the Nios II EDS
nios2-flash-programmer

from a Nios II command-line shell.

If you used the Nios II EDS to derive your software design, you can use the Nios II
EDS tools to convert your compiled and linked software Executable and Linkable
Format File (.elf) design to .flash files. After your design files are in the .flash format,
then both hardware and software files can be written using the Board Update Portal
or using the Nios II EDS nios2-flash-programmer.

1

For more information about Nios II EDS software tools and practices, refer to

www.altera.com/products/ip/processors/nios2/tools/ni2-development_tools.html

The following sections describe how to program the flash device using first the Board
Update Portal, then using only the Nios II EDS command-line tools.

Creating Flash Files Using the Nios II EDS

If you have hardware developed using the Quartus II application, and software
developed using the Nios II EDS, follow these instructions:

1. On the Windows Start Menu, go to All Programs> altera> Nios II EDS> Nios II

Command Shell

.

2. In the Nios II Command Shell, navigate to the directory where your design files

are located and type the following Nios II EDS commands:

For .sof Quartus II hardware files:

sof2flash --input=yourfile_hw.sof --output=yourfile_hw.flash --offset=0xC20000

r

For .elf Nios II software files:

elf2flash --base=0x08000000 --end=0x0BFFFFFF --reset=0x08820000 --input=yourfile_sw.elf
-–output=yourfile_sw.flash
--boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec

r

Advertising