Preparing design files for flash programming, Creating flash files using the nios ii eds, R to – Altera Transceiver Signal Integrity User Manual
Page 50
![background image](https://www.manualsdir.com/files/763783/content/doc050.png)
A–2
Appendix A: Programming the Flash Memory Device
Preparing Design Files for Flash Programming
Transceiver Signal Integrity Development Kit,
February 2013
Altera Corporation
Stratix V GT Edition User Guide
Preparing Design Files for Flash Programming
You can obtain designs containing prepared .flash files from the
page of the Altera website or create
.flash
files from your own custom design.
The Nios II EDS sof2flash command line utility converts your Quartus II-compiled
.sof
into the .flash format necessary for the flash device. Similarly, the Nios II EDS
elf2flash
command line utility converts your compiled and linked Executable and
Linking Format File (.elf) software design to .flash. After your design files are in the
.flash
format, use the Board Update Portal or the Nios II EDS
nios2-flash-programmer
utility to write the .flash files to the user software locations
of the flash memory.
f
For more information about Nios II EDS software tools and practices, refer to the
page of the Altera website.
Creating Flash Files Using the Nios II EDS
If you have an FPGA design developed using the Quartus II software, and software
developed using the Nios II EDS, follow these instructions:
1. On the Windows Start menu, click 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
reside and type the following Nios II EDS commands:
■
For Quartus II .sof files:
sof2flash --input=
--pfl --optionbit=0x00018000 --programmingmode=PS
r
■
For Nios II .elf files:
elf2flash --base=0x0 --end=0x07FFFFFF --reset=0x07160000 --input=
--output=
--boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec
r
The resulting .flash files are ready for flash device programming. If your design uses
additional files such as image data or files used by the runtime program, you must
first convert the files to .flash format and concatenate them into one .flash file before
using the Board Update Portal to upload them.
1
The Board Update Portal standard .flash format conventionally uses either
<filename>_hw.flash for hardware design files or <filename>_sw.flash for software
design files.
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.