Flash an Altera device (SPI Flash Memory)
The flashing procedure should proceed smoothly according the Altera doc:
Using the Serial FlashLoader with the Quartus II Software
Unfortunately we have 3 design with Altera, and two out of three, need a workaround. A standard flashing is described in the section of the EXPLODER, using a bash script in the SCU section, and finally the section of VETAR, describes a still not well understood recipe.
Flashing the EXPLODER
Connect the JTAG to your EXPLODER and follow the document Using the Serial FlashLoader with the Quartus II Software .
Flashing the SCU
Connect JTAG to your SCU as shown in the diagram:
SCUv2-jtag.jpeg
You must also power the SCU by either installing it in a rack or
connecting external power as illustrated.
Given a working jam file (you can use Prebuilt-images), you reprogram the flash of an SCU by executing these commands:
quartus_jli -aerase <jam-file>
quartus_jli -aerase -ddo_epcs_bulk_erase=1 <jam-file>
quartus_jli -ablankcheck <jam-file>
quartus_jli -aprogram <jam-file>
quartus_jli -averify <jam-file>
If you have the sources available (see Building-from-sources), you can simply run:
./scripts/program-scu.sh wr-cores/syn/gsi_scu2/wr_core_demo/scu2.jam
Now that your device is flashed, confirm that it working using the White-Rabbit-Console.
Flashing the VETAR
SFL Megafunction
Altera provides a Serial Flash Loader Megafunction that enables the flashing of the a SPI Flash, once the FPGA is program with a bitstream containing this Megafunction.