Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHere is the script I use to load up an EPCS with a FW/SW pair. The <EPCS BASE> should be the hex address of your EPCS controller component in SOPC Builder. (i.e. 0x04020000) Let me know if this helps. (as I can't send you a private message yet - too few posts:mad:)
#generate flash image for firmware <fw1>
"$SOPC_KIT_NIOS2/bin/sof2flash" --epcs --input="<fw1>.sof" --output="<fw1>.flash"
# program <fw1> firmware into flash memory
"$SOPC_KIT_NIOS2/bin/nios2-flash-programmer" --epcs --base=<EPCS BASE> --cable='USB-Blaster ' --instance=0 "<fw1>.flash"
# generate flash image for <fw1> software <sw1>
"$SOPC_KIT_NIOS2/bin/elf2flash" --epcs --after="<fw1>.flash" --input="<sw1>" --output="<sw1>.flash"
# program <sw2> into flash memory
"$SOPC_KIT_NIOS2/bin/nios2-flash-programmer" --epcs --base=<EPCS BASE> --cable='USB-Blaster ' --instance=0 "<sw1>.flash"