Tutorial: First Flash on M5Stack Cardputer ADV

In this tutorial you will flash PylotOS onto an M5Stack Cardputer ADV (ESP32-S3FN8) over USB-C and verify the board descriptor and Dual-OTA partition slots in the MicroPython REPL.


Hardware Quick Reference

SpecM5Stack Cardputer ADV
SoCM5Stamp-S3A (ESP32-S3FN8, dual-core 240 MHz, native USB-C)
Flash / PSRAM8 MiB Flash (partitions_8MiB_ota.csv: ota_0 3 MiB + ota_1 3 MiB + vfs 1.875 MiB), no external PSRAM
Display1.14" 240×135 ST7789V2 IPS TFT (SPI2_HOST)
KeyboardDedicated I2C TCA8418 matrix controller (I2C0 SDA=G8, SCL=G9, INT=G11)
IMU & AudioBMI270 6-axis IMU (0x68), ES8311 I2S codec (0x18) + 3.5 mm jack + MEMS mic
Storage & IRmicroSD slot (SPI3_HOST, independent of LCD SPI), IR emitter (G44), Battery ADC (G10)

Important (ESP32-S3 vs. ESP32 flash address): Unlike classic ESP32 boards (which flash at 0x1000), the ESP32-S3 bootloader resides at 0x0. Always flash pylotos-m5stack_cardputer_adv-*-full.bin at 0x0.


Step 1: Download the Cardputer ADV Full Image

  1. Open the latest green CI run under Actions (or the latest GitHub Release).
  2. Download the pylotos-m5stack_cardputer_adv-firmware artifact and extract pylotos-m5stack_cardputer_adv-<version>-full.bin.

Step 2: Enter USB Download Mode on Cardputer ADV

  1. Slide the power switch on the side of the Cardputer ADV to OFF.
  2. Hold down the G0 (Boot) button.
  3. While holding G0, connect the USB-C cable to your computer (or switch power ON), wait 1 second, then release G0.
  4. A new serial/USB-JTAG COM port will appear (e.g., COM5 on Windows or /dev/ttyACM0 on Linux).

Step 3: Erase & Flash via esptool

Install esptool and mpremote:

pip install esptool mpremote

Erase the previous flash layout (ensures a clean 8 MiB Dual-OTA partition table) and write the full image at offset 0x0:

# Replace COM5 with your Cardputer ADV serial port
esptool --chip esp32s3 --port COM5 erase_flash
esptool --chip esp32s3 --port COM5 --baud 921600 write_flash 0x0 pylotos-m5stack_cardputer_adv-0.1.0-ci-full.bin

After flashing completes, toggle the power switch (or press Reset) to boot into PylotOS. Because ESP32-S3 enumerates a native MicroPython USB-CDC port, Windows/Linux may assign a new COM/ttyACM port number after reboot.


Step 4: Verify in the MicroPython REPL

Connect to the newly enumerated USB-CDC port:

mpremote connect auto repl

Run:

import json
import pylot
import hal
import sys_ota

print(json.dumps(pylot.describe()))
print("Keyboard capability:", hal.has_cap("keyboard"))
print("IMU capability:     ", hal.has_cap("imu"))
print("OTA partitions:     ", sys_ota.status())

Expected Output Highlights