Forum Discussion

cconger's avatar
cconger
Icon for New Contributor rankNew Contributor
2 years ago

Converting .sof file to .flash file for Stratix 10 GX development kit

Hello Intel,

I have the Stratix 10 GX development kit, and am needing to load a user design into the Flash for auto-configuration of the user design at power up. I've been following through the documentation, and have successfully reached the page in the Board Update Portal where you specify a hardware file.

However, the method of converting the Quartus Prime produced .sof file into the necessary .flash file, is not documented clearly.

The link to the instructions to convert the .sof file state the following:

Convert user .sof file and .elf file to the format required to program the Flash
Note: You must have the NiosĀ® II EDS installed in order to perform this step.
1. From the Start Menu, open Nios II Command Shell
2. In the Nios II Command Shell, navigate to the build_hw.sh file and type

sh build_hw.sh yourfile_hw.sof 1

However, I cannot find the build_hw.sh script anywhere. The instructions only say to navigate to it, but do not say where it is.

A search for that filename in the Quartus Prime 23.1 installation directory does not find it. I was able to find one version of it buried deep in the design material .zip file downloaded from the Stratix 10 GX product page:

stratix10GX_1sg280uf50_fpga_revd_htile_v18.1b222_v1.0.zip\stratix10GX_1sg280uf50_fpga_revd_htile_v18.1b222_v1.0\factory_recovery\build_factory_source\PRD\build_hw.sh

But this does not appear to be the correct script (looks like it will produce a .pof, and we need a .flash right?), and anyways it does not execute correctly when invoked from within the Nios II power shell as it exits with a syntax error.

I saw this previous post with a similar question however it was never actually solved, only marked as complete as the OP stopped responding:

Solved: Procedure for programming the hardware1 region of flash on my Stratix 10 GX development board? - Intel Communities

Please help clarify the process of converting the .sof file into whatever format is needed to load into flash from the Board Update Portal. If I need to use a specific script from within the Nios II power shell, where is that script located? Is there any alternative, or command line command I can enter manually like was done previously with the Arria 10 GX dev kit (sof2flash)?

46 Replies