Forum Discussion

Dennis_Nedry's avatar
Dennis_Nedry
Icon for New Contributor rankNew Contributor
1 hour ago

Generating RBF raw binary file on Max 10

I am trying to design an in-system firmware update for the Max 10 FPGA.  I have a microcontroller between the FPGA and the outside world.  The microcontroller has a large data storage area where I want to store the data for the new FPGA firmware.  I want to load the data into there, then at some later time, have the microcontroller take care of sending the update to the FPGA.

In the interest of modular design, I want to store the data in a generic or raw format.  This will give the microcontroller the option of bit-banging the JTAG of the FPGA, or sending over any other communication channel.  However, I am not able to find a way to get the raw data that goes into the CFM0 section of the FPGA's configuration flash.

When I compile the FPGA's firmware, I get the SOF and POF files.  I am able to use the POF file directly with USB Blaster as usual.  However, these file formats are apparently not public information, so I can't reliably build my own tool for extracting the raw data.  So I started looking into the available utilities in the Quartus software.

In the Quartus Programmer, I looked at File -> Create JAM, JBC, SVF, ISC. All of these formats basically generate a file containing a list of JTAG instructions. Because I want the design to be modular, I do not want to use this directly and be locked into JTAG. Since these formats are documented, I think it would be possible to build my own post-build tool that emulates the receiving end of JTAG and extracts raw data from one of these formats. However, I would like to get the raw data directly somehow in order to minimize risk of error building my own tool like that. So I confinued looking elsewhere to get the raw data.

Next, in the Quartus IDE, I found File -> Convert Programming Files. This utility can generate an RBF file (Raw Binary File), which is EXACTLY what I need. I selected output file type "Raw Binary File (.rbf)", selected the compiled SOF file as the input, and clicked Generate. This gives me the vague error message "Device 10M02SCE144 does not support selected configuration mode". Playing around with lots of settings, I never could get it to generate an RBF file for me.

I was searching the internet how to do this. Ideally, I wanted a command line way of generating the file so I can do this with a post-build script and have the ability for a build server to do this, etc. I found some instructions using the Quartus Nios II Command Shell. It seemed I needed to install a full distribution of Linux on my PC in order to use the shell... Not willing to do that (I am running Windows 11), I did some more digging, and I found the actual EXE file on my hard drive that the command shell stuff was going to run for me, "quartus_cpf.exe". I ran it like this:

quartus_cpf.exe -c firmware.sof firmware.rbf

It still failed, but now I get a slightly better error message:

Device 10M02SCE144 does not support 1-bit Passive Serial scheme

Error (213050): Convert Programming Files was NOT successful -- refer to messages that appear above this message for more information

Error: Quartus Prime Convert_programming_file was unsuccessful. 1 error, 0 warnings

After all of that, I am still stuck. How can I properly get to the raw binary format for the CFM0 memory?

No RepliesBe the first to reply