User guide

Storing Firmware on the Target Board
About Storing Firmware
After you have successfully built and debugged an application, you might want to store the
executable file (.elf) as firmware in your target hardware. You might store firmware in the
target at the end of the development process when the firmware is ready to release to
manufacturing. Alternatively, you might store firmware during the development process as
part of a test procedure.
The following sections discuss the two broad approaches to storing the firmware in the
hardware.
Storing Firmware in On-Chip Memory
Depending on the target FPGA architecture, you can design Nios II systems to initialize on-
chip memory immediately after FPGA configuration. If you configure the system library
project to place program code or data into on-chip memory, the Nios II IDE automatically
creates memory initialization files for the FPGA. The Nios II IDE stores these files in the
same location as the SOPC Builder system file (.ptf). When you are ready to release your
project's executable code, you must send the memory initialization file(s) back to the
hardware designer to include them in the FPGA design.
Memory initialization file names take the form: <name of memory>.hex.
Programming Firmware in Flash Memory
You can program your Nios II executable file directly to a flash memory in your
development hardware.
The Nios II IDE flash programmer provides an easy way to program flash memory
devices
on the target board using an Altera download cable, such as the USB Blaster. The flash
programmer programs executable software files (.elf) and SRAM object files (.sof) into
flash memory. The flash programmer can also program binary data files.
The flash programmer can program two kinds of devices:
Common flash interface (CFI) compliant flash memories
Altera EPCS serial configuration devices
Related Nios II IDE Help Topics
Programming Flash
Flash Programmer Dialog Box
Related Topics on the Web
Nios II Flash Programmer User Guide at
www.altera.com/literature/ug/ug_nios2_flash_programmer.pdf
75