This guide shows how to install both tinyprog and iceprog in an MSYS2 UCRT64 environment on Windows 11 to program Lattice iCE40 FPGAs like the TinyFPGA BX and iCE40UL1K.
This guide is provided for educational purposes. The author is not responsible for any damage to your system, hardware, or data that may result from following these instructions. USB driver modifications and FPGA programming carry inherent risks. Always ensure you have backups and understand the commands before executing them. Use at your own risk.
- Windows 11
- MSYS2 with the UCRT64 environment
- Python 3 installed (
pacman -S mingw-w64-ucrt-x86_64-python) - IceCube2 installed (optional, for Lattice UL1K builds)
tinyprog is a Python-based tool to program TinyFPGA BX over USB.
-
Launch MSYS2 UCRT64 shell
-
(Optional but recommended) Create a virtualenv:
python -m venv ~/.venvs/clitools source ~/.venvs/clitools/Scripts/activate
-
Install
tinyprogusing pip:pip install tinyprog
-
Verify it works:
tinyprog --list
iceprog is part of Project IceStorm and supports programming over FTDI (e.g., iCEstick, iCE40-HX8K, UL1K dev boards).
pacman -S mingw-w64-ucrt-x86_64-libftdi mingw-w64-ucrt-x86_64-libusb mingw-w64-ucrt-x86_64-makeSet up make alias: Add this to your ~/.bashrc file so make works properly:
echo "# Add alias for make" >> ~/.bashrc
echo "alias make='mingw32-make'" >> ~/.bashrc
source ~/.bashrcgit clone https://github.com/cliffordwolf/icestorm.git
cd icestorm/iceprog
makeinstall -m 755 iceprog /usr/local/bin/iceprogiceprog -t -vYou may need to install a libusb driver for your FTDI-based board using Zadig. Scroll down to the Download section. At the time of this writing the latest version was Zadig 2.9 (5.1MB). I selected "Other versions", Closed the add via the "x" button, then selected zadig-2.9.exe 2024-06-13 13:56 5.1M for download.
Select your device (e.g., Dual RS232-HS or iCE40UL1K Eval Kit) and install the libusb-win32 or libusbK driver.
For example, the iCE40UL1K UltraLite breakout board showed up with two interfaces in Zadig:
Interface 0 β used by iceprog for programming the FPGA. We installed the libusbK driver on this interface.
Interface 1 β likely used as a serial COM port by applications. We left this interface untouched so Windows can manage it normally.
Make sure you only replace the driver on the interface used for programming.
tinyprog --program top.biniceprog blinky_top_bitmap.bin