Skip to content

apfaudio/tiliqua-webflash

Repository files navigation

tiliqua-webflash

A little webapp for updating / flashing tiliqua bitstreams in Web browsers that support WebUSB (like Chrome). It is live at apfaudio.github.io/tiliqua-webflash and looks like this:

image

Features

  • Auto-detect connected hardware revision and only show bitstreams compatible with it.
  • Flash a bitstream archive from your local computer.
  • Flash one of any bitstreams in the latest Tiliqua release.
  • Bootstrap a Tiliqua from scratch (flash the bootloader and all bitstreams to each slot). This does NOT bootstrap the RP2040, only the ECP5 SPI flash.

Hacking

I am not a web developer, so this site is a bit spartan. Basically, to build the site, you are going to run a python script, which creates a build/ directory to be statically served. You can serve it locally by:

  • Cloning this repository
  • Make sure the tiliqua submodule is up to date with something like git submodule update --init --recursive
  • Install pdm
  • From the root of this repository, run pdm install to install all the dependencies needed to build and serve the site locally
  • Run pdm serve. Note that this will download the latest Tiliqua gateware release, unzip it to bitstreams/, and build an index of every bitstream that is later used to construct the site.
  • Open Chrome and go to the addresse shown by the command line. From there, you can use the site locally.

Structure

This project uses Pyodide to share most of Tiliqua's python code used for flashing bitstream archives to the device. It runs openFPGALoader compiled to WebAssembly and WebUSB in the browser (see acknowledgements below!).

It is basically a static HTML single-page website. It uses coi-serviceworker to allow SharedArrayBuffer (needed by Pyodide and openFPGALoader wasm) to work even though this site is statically served by GitHub Pages.

AI Disclosure

To help with my (rusty) web development skills, Claude Opus 4.6 was used to assist in the creation of tiliqua-webflash, with a lot of work occuring in the months before nlnet's Generative AI policy was published on December 8, 2025. That being said, this AI generated code is essentially a visual frontend for Tiliqua's python-based flashing code (which was written by hand, and is run in the browser under Pyodide), and openFPGALoader, a separate open-source project. As a result of the overall architecture, the risk surface of e.g. some nefarious AI-generated bug bricking your Tiliqua is essentially nil, as the core flashing logic is shared with the Tiliqua project's command-line tools. In any case, for tiliqua-webflash, we provide the following guidelines concerning GenAI use:

AI-assisted contributions are NOT accepted for:

  • The website text or documentation on the webpage
  • The python-based flashing code shared with the core Tiliqua codebase

AI-assisted contributions ARE accepted for

License

Zero-clause BSD. Do whatever you want with the code in this repo.

Acknowledgements

This project is only made possible by the heavy lifting by Catherine behind the yowasp project, making it possible to run openFPGALoader in the browser. Please support their hard work!

About

Flash Tiliqua bitstreams from a web browser. Built on WebUSB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors