Forum Discussion
Altera_Forum
Honored Contributor
16 years ago# Creating .flash file for the FPGA configuration
echo Creating firmware flash file ...
"$SOPC_KIT_NIOS2/bin/sof2flash" --epcs --compress --input="../altera/top.sof" --output="firmware.flash"# Creating .flash file for software code
echo Creating safe and application flash files ...
"$SOPC_KIT_NIOS2/bin/elf2flash" --epcs --after="firmware.flash" --input="../software/top/Release/top.elf" --output="app.flash"# Convert to binary
echo Converting flash files to binary ...
nios2-elf-objcopy -I srec -O binary firmware.flash firmware.bin
nios2-elf-objcopy -I srec -O binary app.flash app.bin# Concatenate
echo Concatenating binary files to create final programming file ...
cat firmware.bin app.bin > app_image.bin
jakobjones, Sorry for the newbie question but, how do you run your script file? If I open a Nios II Command Shell and type everything in manually, it works. But, I can't figure out how to automate this script.