Preparing design files for flash programming, Creating flash files using the nios ii eds, Converting additional files – Altera Cyclone V GT FPGA User Manual

Page 46

Advertising
background image

A–2

Appendix A: Programming the Flash Memory Device

Preparing Design Files for Flash Programming

Cyclone V GT FPGA Development Kit

September 2014

Altera Corporation

User Guide

Preparing Design Files for Flash Programming

The following sections use the following file types:

Nios II Flash Programmer File (.flash)

Executable and Linking Format File (.elf)

SRAM Object File (.sof)

S-Record File (.srec)

You can obtain designs containing prepared .flash files from the

Cyclone V GT FPGA

Development Kit

page of the Altera website. You can also 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 .elf software

design to .flash.

f

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

Embedded Software Development

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=<yourfile>_hw.sof --output=<yourfile>_hw.flash --offset=0xC80000
--pfl --optionbit=0x00018000 --programmingmode=FPP

r

For Nios II .elf files:

elf2flash --base=0x00000000 --end=0x0FFFFFFF --reset=0x3540000
--input=<yourfile>_sw.elf --output=<yourfile>_sw.flash
--boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec

r

The resulting .flash files are ready for flash device programming.

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.

Converting Additional Files

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. Once converted,
concatenate them into one .flash file before using the Board Update Portal to upload
them.

Advertising