Forum Discussion
generate .jic file from .sof and .elf
- 5 years ago
Hi,
From the jic generation, I observed that you do not set the address for the hex file. I would recommend to set the address that you used based on your Quartus design.
Hi,
I wouldn't recommend converting the sof -> flash -> hex -> jic.
You should convert the nios II FW code to hex and when you are converting to JIC file then you can include both sof and the Nios II FW.
Please refer to https://www.intel.co.jp/content/dam/altera-www/global/en_US/kdb/rd11122013_865/nios-ii-boot-from-epcq-and-epcs-in-quartus-ii-13_0.pdf.
- ScottShin5 years ago
Occasional Contributor
Hi sorry took it took long to reply to you.
I trying the way by the document. Added legacy_epcs_flash_controller in the Qsys, I also set Nios's reset_vector in epcs_flash_controller. then I convert the program file to .jic.
I program successfully, but my function didn't work. seem like Nios doesn't boot right.
That is my memory file.
Meanwhile, I also try the Nios2 flash programmer, but GUI has a problem that can't read the Epcs layout patch file. So I type instruction to implement the flash programmer in Nios2 commend shell , then I got information after both flash programmer instruction finish.
flash programmer instruction :
#sof transfer to flash
sof2flash --input="output_files/balcar_nios.sof" --output="software/balcar_soft_bsp/flash/balcar_nios_epcs_flash_controller_0.flash" --epcs
#program sof flash
nios2-flash-programmer "software/balcar_soft_bsp/flash/balcar_nios_epcs_flash_controller_0.flash" --base=0x1101000 --epcs --sidp=0x11020B0 --id=0x0 --timestamp=1603266025 --device=2 --instance=0 '--cable=DE-SoC on localhost [USB-1]' --program --erase-all --override=c:/nios2-flash-override.txt#elf transfer to flash
elf2flash --input="software/balcar_soft/balcar_soft.elf" --output="software/balcar_soft_bsp/flash/balcar_soft_epcs_flash_controller_0.flash" --epcs --after="software/balcar_soft_bsp/flash/balcar_nios_epcs_flash_controller_0.flash"#program elf.flash
nios2-flash-programmer "software/balcar_soft_bsp/flash/balcar_soft_epcs_flash_controller_0.flash" --base=0x1101000 --epcs --sidp=0x11020B0 --id=0x0 --timestamp=1603266025 --device=2 --instance=0 '--cable=DE-SoC on localhost [USB-1]' --program --override=c:/nios2-flash-override.txtresult information:
program sof.flash result
program elf.flash result
Any advice, I will appreciate.