◆ ALICE IN AI LAND flash the badge · the stages · glitch range · the vault · the level maker · about
checking for WebUSB… GitHub

Flash the badge from this page

The RP2040's ROM bootloader takes firmware over USB, and a Chromium browser can talk to it directly through WebUSB — no picotool, no drive to find, no Python. Chrome, Edge or any other Chromium browser, on Windows, macOS, Linux, ChromeOS and Android. Not Firefox, not Safari, and nothing on an iPhone; those get the download instead.

  1. Put the badge in the bootloader. Hold BootSel — the tiny button at the edge of the cap — while plugging it in; or, on the quick-glitch firmware, hold SELECT + START for two seconds. The LED goes dark. A small drive called RPI-RP2 may pop up; leave it alone.
  2. Pick a firmware below and press Flash. The browser asks which device to use: choose RP2 Boot.
  3. Wait for the reboot. The page erases, writes, reads back, then restarts the badge into the new firmware. Press any button on it afterwards and the log says when the browser sees the controller.

Firmware

What goes on the badge. The site's deploy builds each image from the same commit it publishes, so what you flash is what the page was written against.

…or a .uf2 you built yourself:

pick a firmware

    Without WebUSB

    Download the .uf2, put the badge in the bootloader, and copy the file onto the RPI-RP2 drive that appears; the badge reboots the moment the last block lands. From a checkout, python3 software/tools/flash-badge.py --fetch does the same and confirms the controller came back.

    Linux: the browser has to be allowed to open the bootloader's USB device. Install picotool's udev rule once, then re-plug the badge:

    sudo tee /etc/udev/rules.d/99-picotool.rules <<'EOF'
    SUBSYSTEM=="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", TAG+="uaccess", MODE="660", GROUP="plugdev"
    EOF
    sudo udevadm control --reload-rules

    Windows: nothing to install — the bootloader carries the descriptors that bind WinUSB to its PICOBOOT interface. If the chooser lists no RP2 Boot, the badge is not in the bootloader.

    Android: Chrome works over a USB-C or OTG cable. Dismiss the "USB drive" notification if one appears; the page does not need the drive.

    What the page does is what picotool load does: claim the bootloader's PICOBOOT interface, erase and program flash one 4 KB sector at a time, read it all back, reboot. Source: src/picoboot.js and src/uf2.js, tested without a board by software/tools/verify-flash.mjs.