M5Stack Cardputer Zero · Volume 8

M5Stack Cardputer Zero Volume 8 — Flashing Workflow

M5Burner, web flashers, esptool.py manual flash, factory backup, recovery from a bricked Zero

Contents

SectionTopic
1About this volume
2Flashing-method decision tree
3M5Burner workflow
4Web flasher workflow
5esptool.py manual flash
6Factory backup before customization
7Recovery from a bricked Zero
8Common flash gotchas
9Resources

1. About this volume

Vol 8 covers firmware flashing for Cardputer Zero. The Zero (ESP32-S3 + USB-C native CDC) follows the standard ESP32-S3 flashing pattern — no special hardware, no DFU button required (native USB-CDC means automatic boot-mode entry via DTR/RTS).

Cross-reference: ../../../M5Stack Cardputer ADV/03-outputs/Cardputer_ADV_Complete.html Vol 9 covers ADV-specific flashing; Zero follows the same pattern with a Zero board target.


2. Flashing-method decision tree

   How do you want to flash?


   ┌────────┴────────┐
   │                 │
   │ I want a        │
   │ pre-built fw    │
   │ from a list?    │
   │                 │
   └─────┬───────────┘

    ┌────┴────┐
    │         │
   YES       NO
    │         │
    ▼         ▼
 M5Burner   ┌──────────────────────────────┐
 (GUI tool) │ I want to flash from a URL?  │
            │                              │
            └──────┬───────────────────────┘

              ┌────┴────┐
              │         │
             YES       NO
              │         │
              ▼         ▼
        Web flasher  ┌─────────────────────────────┐
        (browser     │ I have a .bin file locally? │
        WebSerial)   │                             │
                     └──────┬──────────────────────┘

                       ┌────┴────┐
                       │         │
                      YES       NO
                       │         │
                       ▼         ▼
                  esptool.py   Build from source first
                  (Python CLI) (Vol 7); then come back

For tjscientist’s typical Zero workflow: M5Burner for first-time setup, then esptool.py for custom builds.


3. M5Burner workflow

3.1 Installation

M5Burner (docs.m5stack.com/en/uiflow/m5burner_v3) is M5Stack’s official GUI tool for ESP32 device firmware management:

  • Download from M5Stack docs (Windows / macOS / Linux versions)
  • Install + launch
  • Select device family: “Cardputer Zero” (once target is added)
  • Browse firmware catalog

3.2 Standard flow

1. Connect Zero via USB-C
2. Launch M5Burner
3. Select Cardputer Zero from device list
4. Browse firmware catalog
5. Select desired firmware (e.g., "UiFlow", "MicroPython", "M5Launcher")
6. Click "Burn"
7. M5Burner handles the rest — erase + flash + verify
8. Press device reset (or it auto-restarts)

3.3 What M5Burner provides

  • Pre-built firmware catalog from M5Stack
  • Standard firmwares (UiFlow, MicroPython)
  • Community firmware additions (Bruce, MicroHydra, NEMO when available for Zero)
  • Erase-and-flash workflow that handles partition setup
  • Backup-before-flash option (recommended)

4. Web flasher workflow

4.1 What it is

Web flashers (M5Launcher, Bruce, etc.) use the WebSerial API in modern browsers (Chrome, Edge, Brave; not Firefox/Safari) to flash devices directly from a webpage — no installed tool needed.

4.2 M5Launcher web flasher

1. Open https://bmorcelli.github.io/Launcher/ in Chrome/Edge
2. Connect Zero via USB-C
3. Click "Flash" button
4. Grant browser permission for serial port
5. Select the device's COM port
6. Click flash; web flasher handles the rest

4.3 Bruce web flasher

1. Open Bruce GitHub releases page
2. Find the latest release with web flasher
3. Browser opens the flasher interface
4. Connect Zero, click flash

4.4 Pros / cons of web flasher

Pros:

  • No installed software
  • Zero-friction for non-technical users
  • Latest firmware always served
  • Works from any modern browser

Cons:

  • Requires Chrome/Edge (no Firefox/Safari)
  • Network dependency for serving the flasher itself
  • Less control vs manual flash
  • Some flashers don’t yet support Zero target

5. esptool.py manual flash

5.1 When to use

For tjscientist’s custom builds (Vol 7) — local .bin compiled and ready to flash. Workflow:

5.2 Install esptool

pip install esptool

Or use the version bundled with Arduino IDE / PlatformIO.

5.3 Identify the COM port

Linux/macOS:

ls /dev/cu.usb* /dev/ttyUSB* /dev/ttyACM*

Windows: check Device Manager → Ports (COM & LPT) for the new “ESP32-S3” or “Silicon Labs CP210x USB” entry.

5.4 Flash full firmware

esptool.py \
    --port /dev/cu.usbserial-12345 \  # or COM3 on Windows
    --chip esp32s3 \
    --baud 921600 \
    write_flash \
    -z 0x0 firmware.bin

# Where firmware.bin is your built file
# Offset 0x0 if it includes bootloader+partition+app
# Otherwise typical layout:
# 0x0000     bootloader.bin
# 0x8000     partitions.bin
# 0x10000    firmware.bin
esptool.py --port /dev/cu.usbserial-12345 erase_flash

Then flash.

5.6 Verify flash

esptool.py --port /dev/cu.usbserial-12345 \
    --chip esp32s3 \
    read_mac

# Should output the device MAC; confirms communication

6. Factory backup before customization

6.1 Why backup

Zero ships with vendor firmware (likely M5Launcher pre-flashed or UiFlow). Before custom flashing:

  • Save the vendor firmware for rollback
  • Save the SD contents if any pre-loaded data
  • Document the as-shipped state for engagement record

6.2 Backup procedure

# Backup entire flash to a file
esptool.py \
    --port /dev/cu.usbserial-12345 \
    --chip esp32s3 \
    read_flash 0 0x800000 \  # 8 MB flash
    cardputer_zero_factory_backup_$(date +%Y%m%d).bin

# Verify file size: should be 8388608 bytes for 8 MB
ls -la cardputer_zero_factory_backup_*.bin

6.3 Store the backup

  • Local copy on host PC
  • Backup to NAS / cloud
  • Note serial number + date

6.4 Restore from backup

If you need to roll back:

esptool.py \
    --port /dev/cu.usbserial-12345 \
    --chip esp32s3 \
    --baud 921600 \
    write_flash \
    0 cardputer_zero_factory_backup.bin

7. Recovery from a bricked Zero

A bricked Zero means firmware that’s corrupted, won’t boot, or stuck in a bootloop.

7.1 Symptoms

  • Display blank or showing kernel-panic
  • USB-C doesn’t enumerate
  • Keyboard unresponsive
  • Continuous reset cycle

7.2 Recovery: erase + reflash

The native USB-CDC interface is always accessible because the ROM bootloader is hardware-fixed. Standard recovery:

# 1. Force boot mode (if needed; usually automatic with esptool.py)
# Hold the boot button (if Zero has one) while powering on
# OR rely on esptool.py to use DTR/RTS to trigger boot mode

# 2. Erase
esptool.py --port /dev/cu.usbserial-12345 erase_flash

# 3. Reflash known-good firmware
esptool.py --port /dev/cu.usbserial-12345 \
    --chip esp32s3 \
    --baud 921600 \
    write_flash -z 0x0 known_good_firmware.bin

# 4. Reset (often automatic)

7.3 If USB-CDC doesn’t enumerate

This is the worse case — silicon-level brick:

  • Check USB cable: try a different cable (data-capable, not charge-only)
  • Try different USB port on host
  • Try forced boot mode: hold boot button while plugging USB
  • If none work: vendor RMA

For Zero, the USB-CDC interface is integral to the ESP32-S3 silicon, so true brick is rare unless the silicon itself is damaged (power surge, ESD, etc.).


8. Common flash gotchas

SymptomCauseFix
Failed to connect to ESP32-S3USB cable charge-only; wrong board targetUse data cable; verify board in IDE/PlatformIO
Flash size mismatchWrong size in build vs actualSet to 8MB in build config
Wrong board targetSelected K132 (original) vs ZeroUse Zero env if available; otherwise use generic ESP32-S3
Flash succeeds but no bootWrong partition tableReflash with standard partitions
Slow flash speedDefault baud too low--baud 921600
Device not in download modeBoot button not held / DTR not assertedHold boot, retry; OR use --before default_reset
Cannot enter boot modeHardware boot button brokenTry erase_flash; auto-recovers on next boot
Mid-flash failureUSB cable jiggleUse shorter cable; secure connection

9. Resources

End of Vol 8. Next: Vol 9 covers use cases + recipes — the Zero-specific workflows for budget, education, fleet ops, and basic pentest scenarios.