Forum Discussion
Altera_Forum
Honored Contributor
12 years agoHi,
I use 2 methods to write EPCS: - Quartus jtag flow: generate a jic and use quartus programmer - Update EPCS content with custom logic to allow product update The 1st method requires a nios file formated with "intel" format and the second requires "binary" format. I use this script to generate file: # echo "Converting SOF file..." # sof2flash --epcs --compress --input=$sof --output=hw.flash # echo echo "Converting ELF file..." elf2flash --epcs --input=$elf --output=sw.flash # echo echo "Creating HEX file..." # cp hw.flash hw_sw.flash # chmod 777 hw_sw.flash # cat sw.flash >> hw_sw.flash echo "=> Use iHex file to generate JIC with Quartus" nios2-elf-objcopy --input-target srec --output-target ihex sw.flash $hex_sw --change-addresses=0x400000 echo "=> Use binary file to update epcs nios file (change file extension from .hex to .rbf)" nios2-elf-objcopy --input-target srec --output-target binary sw.flash $hex_sw_raw1 --change-addresses=0x400000 # nios2-elf-objcopy -I srec -O binary $elf $hex_sw_raw echo