English
Language : 

P0071 Datasheet, PDF (41/43 Pages) Altera Corporation – DE2-115 with LCD Touch Panel and Camera
5.4 Restoring the Factory Image
This section describes some details about the operation of restoring the Application Selector factory
image.
Combining factory recovery binary files
In the factory settings, you need to program Application Selector binary files to EPCS. Before
programming, you should combine application selector software binary file and hardware binary
file together by executing the instructions below:
• Copy both the tPad_Selector.sof and tPad_Selector.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 command commands listed below
• Convert tPad_Selector.sof file into tPad_Selector_HW.flash file
sof2flash --epcs –input=tPad_Selector.sof --output= tPad_Selector_HW.flash
• Convert .flash file into .bin file
nios2-elf-objcopy –I srec –O binary tPad_Selector_HW.flash tPad_Selector_HW.bin
• From the command shell navigate to where your ELF file is located and create your software
bin image using the following command commands listed below
• Convert tPad_Selector.elf into tPad_Selector_SW.flash
elf2flash –epcs --after=tPad_Selector_HW.flash --input=tPad_Selector.elf
--output=tPad_Selector_SW.flash
• Convert tPad_Selector_SW.flash into tPad_Selector_SW.bin
nios2-elf-objcopy –I srec –O binary tPad_Selector_SW.flash tPad_Selector_SW.bin
• Combine tPad_Selector_HW.bin and tPad_Selector_SW.bin using the following command
cat tPad_Selector_HW.bin tPad_Selector_SW.bin > tPad_Selector.bin
• The generated tPad_Selector.bin is our target binary file
40