This is intended for use during the sweatshop and at camp.
sudo apt-get install libusb-1.0-0
(or something alike)- Clone this repository
pip install pyserial
Copy build files, includingflashargs
, to theesp32
folder- Run
./prepare
(needs sudo to install udev rules) - Run
./flash
- Flash badges
- When done,
./remove_udev_rules
When the udev rules are installed, connecting a badge with the RP2040 in boot
select mode[1] will trigger the first rule which runs picotool
with the bus
and device number as arguments. This flashes the RP2040 after which it will
reboot.
Running ./flash
starts esp32/badge_multiflash_daemon.py
, which continuously
looks for newly connected serial devices. When one is connected, it checks the
minor node number on the tty
device to distinguish between the different
serial interfaces on the badge. If the minor node number is 0, that means it is
the serial bus to the ESP32 and it will use esptool.py
to flash the ESP32.
After flashing, it waits for the device to disconnect before going back to
checking for a connected device.
1: Blank badges will be in boot select mode when they are powered on. To get a badge which already has firmware into boot select mode, power it up while pressing SELECT.