pico-dirty-blaster

JBC to UF2 Utility

This tool enables Drag-n-Drop programming of an FPGA. It converts an Altera JBC file into a UF2 file that can be loaded into a microcontroller to program an FPGA. It takes an existing JBC player firmware file in UF2 format and adds the JBC data along with a header describing the JBC file to the player firmware.

To use the output file, connect the Raspberry Pi Pico board to the JTAG signals on the FPGA. The Pico-Dirty-Blaster project has several adapters to assist with these connections. Next, hold down the BOOTSEL button while plugging in the Pico board to activate the flashloader. When the drive appears on your computer, drag-n-drop the UF2 file onto the drive to transfer the image to the Pico board. After the image is written to the Pico board, it will reboot and run the JBC player to load the FPGA with the JBC image you provided to the script.

Generating a JBC File

JBC is the STAPL JAM Byte Code format. Quartus can generate these files. In order to fit within the memory constraints of a microcontroller, compression is not supported. Instructions for generating an uncompressed JBC file can be found here.

To build get an uncompressed .jbc file:

  1. Go to Device > Device and Pin Options > Programming Files and select the “JEDEC STAPL Format File (.jam)” checkbox, or add set_global_assignment -name GENERATE_JAM_FILE ON to your Quartus project settings
  2. Run quartus_jbcc.exe -n <filename>.jam <filename>.jbc

Example

python3 uf2jbc.py -u pico-jbi.uf2 -j blinky.jbc -b 0x10020000 -a "PROGRAM" -d "MAX10 Blinky" -o max10_blinky.uf2

Arguments

JBC Player Implementations

pico-jbi.uf2

This is a JBC player implementation for the RP2040 based Raspberry Pi Pico board