Skip to content

SavageCore/GP2040-Flasher-Pi

Repository files navigation

GP2040-Flasher

A simple tool to flash GP2040-CE boards/controllers with the latest firmware

Quick screencast of it in action:

preview.mp4

preview

Installation

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.

  1. Follow the instructions to install picotool.
  2. Install SDL 1.2 Dev libraries for your operating system. [More information]
  3. Clone this repository.
  4. Run pip install -r requirements.txt to install the required Python packages.

Usage

  1. cd into the directory where you cloned this repository.
  2. Run sudo python3 main.py to start the program. (You must run as root to access the GPIO pins and the framebuffer.)
  3. Select the firmware you want to flash with the top 2 buttons.
  4. Hold the BOOTSEL button on the device you wish to flash and plug it into the Pi.
  5. 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.

Offline Usage

  1. Download the latest releases from the releases page and place them in the firmware directory.
  2. 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published