Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Created March 31, 2026 14:01
Show Gist options
  • Select an option

  • Save WietseWind/a0b81b3cdf7aa59dd67bf7ba2b53d0ef to your computer and use it in GitHub Desktop.

Select an option

Save WietseWind/a0b81b3cdf7aa59dd67bf7ba2b53d0ef to your computer and use it in GitHub Desktop.
Install Espruino on XIAO ESP32-C3

Flashing Espruino on Seeed XIAO ESP32-C3 (macOS)

1. Detect connected USB devices

system_profiler SPUSBDataType

The XIAO ESP32-C3 shows up as a CP2102N USB to UART Bridge Controller (Silicon Labs) when using an older unit, or as a native USB-Serial/JTAG device on newer units.

To search specifically:

system_profiler SPUSBDataType | grep -i -E "seeed|xiao|esp32|ch34|cp210|silicon|wch" -A 10 -B 2

Find the serial port:

ls /dev/cu.*

The device will appear as something like /dev/cu.usbmodem71201 (native USB) or /dev/cu.usbserial-XXXX (CP210x bridge).

Verify it's the right device using esptool:

python3 -m esptool --port /dev/cu.usbmodem71201 chip-id

Expected output:

Chip type:    ESP32-C3 (QFN32) (revision v0.4)
Features:     Wi-Fi, BT 5 (LE), Single Core, 160MHz, Embedded Flash 4MB (XMC)
USB mode:     USB-Serial/JTAG
MAC:          xx:xx:xx:xx:xx:xx

2. Install esptool (if not already installed)

pip3 install esptool

3. Download Espruino firmware

Latest cutting-edge builds: https://www.espruino.com/binaries/travis/master/

cd /tmp
curl -O https://www.espruino.com/binaries/travis/master/espruino_2v29.28_esp32c3.tgz
tar xzf espruino_2v29.28_esp32c3.tgz
cd espruino_2v29.28_esp32c3

Contents:

README_flash.txt
README_flash_C3.txt
README_flash_S3.txt
bootloader.bin
espruino-esp32c3.bin
partition-table.bin

4. Flash Espruino

python3 -m esptool \
  -p /dev/cu.usbmodem71201 \
  -b 460800 \
  --before default-reset \
  --after hard-reset \
  --chip esp32c3 \
  write-flash \
  --flash-mode dio \
  --flash-size detect \
  --flash-freq 80m \
  0x0 bootloader.bin \
  0x8000 partition-table.bin \
  0x10000 espruino-esp32c3.bin

To flash multiple devices one after another, just swap the device and re-run the same command. The MAC address in the output confirms which physical unit you flashed.

5. Verify

Connect at 115200 baud and send a JS expression:

python3 -c "
import serial, time
s = serial.Serial('/dev/cu.usbmodem71201', 115200, timeout=3)
s.write(b'\n1+1\n')
time.sleep(1)
print(s.read(s.in_waiting or 2048))
s.close()
"

Expected response: =2 — the Espruino REPL is alive.

6. Connect via Web IDE

Open https://www.espruino.com/ide/ in Chrome or Edge and connect to the serial port.

Notes

  • The user LED is on GPIO8, active low (digitalWrite(8, 0) turns it on).
  • Firmware version flashed: 2v29.28 (March 23, 2026)
  • All three devices flashed were confirmed distinct by MAC address:
    • Device 1: 58:8c:81:a9:33:70
    • Device 2: 58:8c:81:ab:b0:18
    • Device 3: 94:a9:90:6c:88:bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment