This utility automatically detects and flashes DeskHog firmware to multiple ESP32-S3 boards as they are connected.
- Automatically detects new ESP32-S3 Feather boards when plugged in
- Maintains an in-memory list of already-flashed boards to prevent re-flashing
- Supports parallel flashing of multiple boards
- Real-time monitoring of board connections/disconnections
- Live progress display with visual progress bars
- Status tracking for each board (building, flashing, verifying, etc.)
- Verbose mode for debugging
- Python 3.6+
- PlatformIO CLI (
pip install platformio) - pyserial (
pip install pyserial) - USB drivers for ESP32-S3
From the DeskHog project root directory:
python multi_flash.pyOr if you made it executable:
./multi_flash.py-v, --verbose: Show detailed flashing output-f, --firmware <path>: Use a specific firmware file instead of building-r, --reset: Clear the list of flashed boards and exit
-
Basic monitoring and flashing:
python multi_flash.py
-
Verbose mode (see detailed upload progress):
python multi_flash.py -v
-
Flash a specific firmware file:
python multi_flash.py -f .pio/build/adafruit_feather_esp32s3_reversetft/firmware.bin
-
Reset the flashed board memory:
python multi_flash.py -r
- The script continuously scans for connected USB devices
- When it detects an ESP32-S3 board (by VID/PID or description), it checks if it's already been flashed
- New boards are automatically flashed using PlatformIO's upload command
- Successfully flashed boards are remembered to prevent re-flashing
- The script handles multiple boards simultaneously using threading
- A real-time display shows:
- Active flashing operations with progress bars
- Current status (building, connecting, writing, verifying)
- Completed boards with success/failure indicators
- Total count of flashed boards
The script identifies ESP32-S3 boards by:
- USB Vendor ID: 0x303A (Espressif) or 0x239A (Adafruit)
- USB Product ID: Various ESP32-S3 identifiers
- Device description containing "ESP32", "ESP32-S3", "Adafruit", or "Feather"
- Make sure the board is in normal mode (not bootloader mode)
- Check USB cable and connection
- Try verbose mode to see what devices are being detected
- The board might need to be put in bootloader mode manually (hold D0 while pressing Reset)
- Check that PlatformIO is properly installed
- Ensure you're running from the DeskHog project root directory
- This might happen if the board doesn't have a unique serial number
- Try disconnecting and reconnecting the board
- Use the reset option (
-r) to clear the memory if needed
- Keep the script running while connecting multiple boards
- Boards can be connected one at a time or multiple at once
- The display automatically refreshes to show real-time progress
- Progress bars show the current stage of flashing (0-100%)
- Status indicators:
- 🔄 = Currently flashing
- ✅ = Successfully flashed
- ❌ = Failed to flash
⚠️ = Disconnected during flash
- Press Ctrl+C to stop monitoring
================================================================================
DeskHog Multi-Board Flash Monitor
================================================================================
Time: 14:32:15 | Press Ctrl+C to stop
--------------------------------------------------------------------------------
📊 Board Status (2 flashed, 1 active):
🔄 /dev/cu.usbmodem14201 [████████████████░░░░░░░░░░░░░] 54% - Writing firmware
✅ 303A:1001:ABCD1234 - ✓ Successfully flashed
✅ 239A:811C:XYZ789 - ✓ Successfully flashed
--------------------------------------------------------------------------------
💡 Tip: Boards are automatically detected and flashed when plugged in