A simple tool to flash GP2040-CE boards/controllers with the latest firmware
Quick screencast of it in action:
preview.mp4
This guide assumes you're running a Raspberry Pi (< 4) with PiTFT and have followed the Easy Install guide making sure to setup as a Raw Framebuffer Device.
- Follow the instructions to install picotool.
- Install SDL 1.2 Dev libraries for your operating system. [More information]
- Clone this repository.
- Run
pip install -r requirements.txt
to install the required Python packages.
- cd into the directory where you cloned this repository.
- Run
sudo python3 main.py
to start the program. (You must run as root to access the GPIO pins and the framebuffer.) - Select the firmware you want to flash with the top 2 buttons.
- Hold the BOOTSEL button on the device you wish to flash and plug it into the Pi.
- The firmware will be flashed to the device and it will reboot as a controller. (The firmware is nuked if needed)
Also included is a script to create a systemd service to start the flasher on boot. To use it, run ./create-systemd-service.sh
and it will start on next boot. To stop it from starting on boot, run sudo systemctl disable gp2040-flasher
. If you want to start it manually, run sudo systemctl start gp2040-flasher
.
You can double press the bottom button to exit the program. Note if you installed the systemd service, it will restart the program.
- Download the latest releases from the releases page and place them in the
firmware
directory. - Start the app with
sudo python3 main.py --offline
.
The app will also fail gracefully if you're API rate limited or any other connection issue to GitHub and fallback to offline mode.