English
Language : 

P0071 Datasheet, PDF (39/43 Pages) Altera Corporation – DE2-115 with LCD Touch Panel and Camera
names can be anything so long as they adhere to the FAT file system long file name rules. Spaces
are permitted.
CFI Flash
CFI flash is used to store the software binary files of applications. All software binary files used by
the application selector contain a boot copier which is pre-ended by the Nios2-elf-objcopy utility
during file conversion process described in the “Creating Your Own Loadable Applications” section.
The boot copier copies the software code to program memory before running it. The Application
software binary file is stored in flash at load time to an offset 0x0.
EPCS Device
EPCS is used to store both the binary file of the Application Selector (both hardware and software
image) itself, as well as hardware binary files of applications which are being loaded. The
Application Selector binary file is permanently stored in EPCS device at offset 0x0. Hardware
binary files for the applications being loaded get written to EPCS at load time to an offset
0x400000.
Creating Your Own Loadable Applications
It is easy to convert your own Nios II design into an application which is loadable by the
Application Selector utility. All you need is a hardware image (a .SOF file) and a software image
which runs on that hardware (a Nios II .ELF file).
The only restrictions are:
• The hardware designs must contain a CFI Flash controller (1*)
• The .SOF file must contain a Nios II CPU whose reset address is set to CFI Flash at offset 0x0
• Before compiling the software, make sure you have set your software’s program memory (.text
section) in Flash memory under the System Library Properties (Nios II IDE) page or through
BSP Editor (Nios II SBT for Eclipse) utility (2*)
Once you have your working .SOF and .ELF file pair, perform the following steps to convert them
to a loadable application selector compatible application.
• Copy both the .SOF and .ELF files into a common directory relying on your choice. This
directory is where you will convert the files
• On your host PC, launch a Nios II Command Shell from Start ->Programs -> Altera -> Nios
II <version #> EDS -> Nios II Command Shell
• From the command shell navigate to where your SOF file is located and create your hardware
binary file using the following commands
• Convert .sof file into .flash file
sof2flash --epcs --input=”your example.sof” --output= “your example_HW.flash”(3*)
38