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
| Spec | M5Stack Cardputer ADV |
|---|---|
| SoC | M5Stamp-S3A (ESP32-S3FN8, dual-core 240 MHz, native USB-C) |
| Flash / PSRAM | 8 MiB Flash (partitions_8MiB_ota.csv: ota_0 3 MiB + ota_1 3 MiB + vfs 1.875 MiB), no external PSRAM |
| Display | 1.14" 240×135 ST7789V2 IPS TFT (SPI2_HOST) |
| Keyboard | Dedicated I2C TCA8418 matrix controller (I2C0 SDA=G8, SCL=G9, INT=G11) |
| IMU & Audio | BMI270 6-axis IMU (0x68), ES8311 I2S codec (0x18) + 3.5 mm jack + MEMS mic |
| Storage & IR | microSD 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 at0x0. Always flashpylotos-m5stack_cardputer_adv-*-full.binat0x0.
Step 1: Download the Cardputer ADV Full Image
- Open the latest green CI run under Actions (or the latest GitHub Release).
- Download the
pylotos-m5stack_cardputer_adv-firmwareartifact and extractpylotos-m5stack_cardputer_adv-<version>-full.bin.
Step 2: Enter USB Download Mode on Cardputer ADV
- Slide the power switch on the side of the Cardputer ADV to OFF.
- Hold down the
G0(Boot) button. - While holding
G0, connect the USB-C cable to your computer (or switch power ON), wait 1 second, then releaseG0. - A new serial/USB-JTAG COM port will appear (e.g.,
COM5on Windows or/dev/ttyACM0on 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
board_id:"m5stack_cardputer_adv"chip:"esp32s3"caps: includes"display","keyboard","sdcard","battery","imu","audio","wifi","ble"ota:running_slot == "ota_0",next_slot == "ota_1"(ready for Dual-OTA!)