Forum Discussion

shauls's avatar
shauls
Icon for New Contributor rankNew Contributor
1 year ago
Solved

Generating Flash Programming file using sof2flash

Hi,

I am working with Agilex device AGIB023R31B1E1VB.
The FPGA is connected to to a QSPI Flash MT25QU02G.
I want to use an external programmer tool and understood that I need to use the sof2flash utility.
I run the following : sof2flash --offset=0x0 --input=standard.sof --output=standard_cfi.flash

And I get the following error: file not found or not valid

The file exist and i am running the command under the correct directory.

Nov 12, 2024 3:25:57 PM com.altera.commandApplication.CmdApp severe
SEVERE: sof2flash: Input file, not found, or is not a valid SOF file.

Used the following version:

------------------------------------------------
Altera Nios2 Command Shell

Version 23.4, Build 79

My question:

Does Agilex SOF file conversion is supported?

Does MT25QU02G is supported in sof2flash command?

Are there any other ways to convert it?

Shaul

7 Replies

  • KianHinT_altera's avatar
    KianHinT_altera
    Icon for Frequent Contributor rankFrequent Contributor

    Hi Shaul,

    From the sof2flash description, it will generate a s-record/srec file output

    I saw that is one KDB on converting , but I'm not sure whether it supports your flash size density , but you can try if needed and change the EPCQ.

    https://www.intel.com/content/www/us/en/support/programmable/articles/000077309.html

    https://www.intel.com/content/www/us/en/docs/programmable/683689/current/nios2-elf-objcopy.html

    Alternatively I was talking to our engineering, since niosII is obsolete and removed from newer Quartus Pro version, tools such as sof2flash & nios2-elf-objcopy also been removed , the recommended approach for programming SOF into QSPI is to use JIC file instead.

    Thanks

    Regards

    Kian

  • KianHinT_altera's avatar
    KianHinT_altera
    Icon for Frequent Contributor rankFrequent Contributor

    Hi Shaul,

    Thanks for contacting Intel Support Forums. I'm Kian and will be assisting in this case.

    Please do allow me some time to check on the sof2flash and will revert back to you.

    Thanks

    Regards

    Kian

  • shauls's avatar
    shauls
    Icon for New Contributor rankNew Contributor

    Thanks Kian,

    Meanwhile it looks like nios2-elf-objcopy command works with RPD file conversion.

    Do you know what is the difference with sof2flash output versus nios2-elf-objcopy output.

    I mean what is actually the file format output of sof2flash because I can have different format conversion with nios2-elf-objcopy.

  • shauls's avatar
    shauls
    Icon for New Contributor rankNew Contributor

    Hi Kian,

    Yes that's understood.

    Using nios2-elf-objcopy can give the same output as sof2flash by using 'srec' format.

    I know JIC is best to program the Flash by JTAG but we have another hardware option to implement Flash programming using external host (and I don't mean remote update) without involving the FPGA .

    something like this:

    So thank you for the information about sof2flash issue and obsolete nios2-elf-objcopy in the future.

    Shaul

    • KianHinT_altera's avatar
      KianHinT_altera
      Icon for Frequent Contributor rankFrequent Contributor

      Hi Shaul,

      Thanks for the reply , understood why you need the srec instead of using JIC.

      If there is no further question related to the case , I will set this thread to community support.

      Thanks

      Regards

      Kian

      • shauls's avatar
        shauls
        Icon for New Contributor rankNew Contributor

        Hello Kian,

        No further questions.

        Thank You !