Forum Discussion
ZhiqiangLiang
Occasional Contributor
6 months agoThank you!
I read the description related to EPCS in your link which is really helpful.
There are 3 steps to generate elf image hex file:
sof2flash --input= TFT_SRAM.sof --output=hwimage.flash --epcs –verbose
elf2flash --input=tft_touch.elf --output=swimage.flash --epcs --after=hwimage.flash –verbose
nios2-elf-objcopy --input-target srec --output-target ihex swimage.flash swimage.hex
elf2flash --input=tft_touch.elf --output=swimage.flash --epcs --after=hwimage.flash –verbose
nios2-elf-objcopy --input-target srec --output-target ihex swimage.flash swimage.hex
my questions are:
1) My flash is EPCS64, in the upper commends, should I use --epce64 or --epcs?
2) If I follow your link to program jic file, I don't need to generate ROM in Platform Designer, right? I should remove the ROM in the design in the following picture, right?
After I remove ROM in my design, I add "Serial Flash Controller Intel FPGA IP".
I set NIOS II reset vector memory in the following picture.
"Serial Flash Controller Intel FPGA IP " is connected to NIOS II shown in the following picture.
3) when I run sof2flash command, I encountered the issue:
May 28, 2025 2:53:38 PM - (FINE) sof2flash: Starting
foo:10A10CL120YF484I7GMay 28, 2025 2:53:38 PM - (SEVERE) sof2flash: Unrecognized device family in SOF.
The sof2flash utility takes an FPGA configuration file in SOF format and
translates it to a FLASH file that can be programmed into the flash
memory connected to an Altera FPGA.
foo:10A10CL120YF484I7GMay 28, 2025 2:53:38 PM - (SEVERE) sof2flash: Unrecognized device family in SOF.
The sof2flash utility takes an FPGA configuration file in SOF format and
translates it to a FLASH file that can be programmed into the flash
memory connected to an Altera FPGA.
The device model I am using is: Cyclone 10 LP 10CL120YF484.
4) I follow the steps blow :
quartus_cpf -c --device=EPCS64 -o auto_create_rpd=on -o rpd_little_endian=on NIOS_BF5V.sof NIOS_ONLY_sof.pof
nios2-elf-objcopy -I binary -O srec --srec-forceS3 --srec-len 32 NIOS_ONLY_sof_auto.rpd NIOS_ONLY_sof.flash
nios2-elf-objcopy -I srec -O ihex NIOS_ONLY_sof.flash hwimage.hex
elf2flash --input=BF5V_C.elf --output=swimage.flash --epcs --after=NIOS_ONLY_sof.flash --verbose
nios2-elf-objcopy -I srec -O ihex swimage.flash swimage.hex
nios2-elf-objcopy -I binary -O srec --srec-forceS3 --srec-len 32 NIOS_ONLY_sof_auto.rpd NIOS_ONLY_sof.flash
nios2-elf-objcopy -I srec -O ihex NIOS_ONLY_sof.flash hwimage.hex
elf2flash --input=BF5V_C.elf --output=swimage.flash --epcs --after=NIOS_ONLY_sof.flash --verbose
nios2-elf-objcopy -I srec -O ihex swimage.flash swimage.hex
I can generate the hex file. however, when I do Eclipse-->Run-->Run Configurations and Run, Eclipse report the following error.
Archer_Altera
Occasional Contributor
6 months agoHi Zhiqiang,
The steps in item 4 as you described are the right solution to solve unrecognized SOF issue when run SOF2FLASH command.
Now you can generate hex file. Have you tried to add it into JIC file and program into flash as described in link below? Can your system boot from epcs flash now?
https://www.cnblogs.com/xiaomeige/p/6709991.html
About error when you try Eclipse-->Run-->Run Configurations and Run, please kindly create a new case for it. Thank you for your cooperation.