English
Language : 

P0103 Datasheet, PDF (47/50 Pages) AEL Crystals Ltd – Introduction of the VEEK-MT
 nios2-elf-objcopy –I srec –O binary “your example_HW.flash” “your example_HW.bin”
 From the command shell navigate to where your ELF file is located and create your software
binary file using the following command
 nios2-elf-objcopy –O binary “your example.elf” “your example_SW.bin ”(4,5*)
 Create a new subdirectory and name it what you would like the title of your application to be
shown as in the application selector
 Using an SD card reader, copy the directory onto an SD Card into a directory named
“Application_Selector”. The directory structure on the SD Card should look like this:
 Application_Selector\<Name of Application>\{<elf_name>_SW.bin;<sof_name>_HW.bin}
 Place the SD card in the VEEK-MT, and switch on the power. The Application Selector will
start up, and you will now see your application appear as one of the selections
Note:
(1).You may not need a CFI Flash controller when your design does not contain a Nios II
processor or you store your software code within the on-chip memory and use the .hex
initialization file.
(2).If you would like to use other memories such as SRAM or SDRAM as the program memory,
you may need to perform two steps to convert your .elf file into .bin file to make the software
properly run on VEEK-MT. The commands seem to look like this:
elf2flash --base=flash_base_address --end=flash_end_address --reset=flash_base_address
--input="<your software name>.elf" --output="<your software name>.flash"
--boot="$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_cfi.srec"
nios2-elf-objcopy –I srec –O binary <your software name>.flash <your software name>_SW.bin
(3).You may pad a --compress option for saving binary image space because the Cyclone IV E
series support the decompress feature while loading hardware image from EPCS device.
(4).The command will use the default HAL boot loader and link it to the .text section.
(5).You can also use the tool ‘bin_demo_batch’ to convert your sof and elf to bin. Copy ”your
example.sof” and “your example.elf” to the bin_demo_batch folder, rename them to test.sof,
test.elf, execute the test.bat, then the final test_HW.bin and test_SW.bin are your target files.
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 Selector.sof and Selector.elf files into a common directory relying on your
choice. This directory is where you will convert the files
VEEK-MT User Manual
44
www.terasic.com
May 20, 2014