FFP

iCE40 FPGA and SPI Flash Programmer

April 2019

Status: Finished, feature-complete, in use

FFP on GitHub

FFP (“FPGA/Flash Programmer”) is a bare-bones USB to SPI bridge for programming iCE40 FPGAS and their flash memories over SPI. It supports swapping the direction of the SPI MISO and MOSI pins, which is required for talking to both the FPGA and the flash it is connected to, and programs an entire iCE40 image in less than a second. It can also be used to dump data from SPI flashes.

The firmware and host software are both written in Rust, including a custom Rust USB stack in the firmware.

I’ve also built the hardware design into other FPGA projects, as the cost of the STM32F042 and USB-C connector is about the same as the cost of the 10-pin 0.05” JTAG connectors I would otherwise use. This has the extra advantage of giving each board a unique serial number which you can query over USB, used to deterministically program the right board even with multiple boards connected at the same time.

My Rust USB “stack” for STM32F0 is enumerating and talking to PyUSB! This is for my little USB-SPI widget for programming FPGAs/flash memory: https://t.co/MEfr05onkb pic.twitter.com/xG6tlzVaXL

— Adam Greig (@adamgreig) May 8, 2019