Skip to content

Flashing from a computer

psonnera edited this page Jul 19, 2026 · 4 revisions

Flashing from a computer

If you would rather not use the Android app, you can write the pre-built binary from a computer with esptool.

Pre-built binary

The build for the 16 MB M5Stack cores (Basic 16 MB / v2.7, Fire, Core2) is in the repository under Binaries/ESP32_16MB/. The partition layout matches M5_NightscoutMon, so the same web-flasher / updater tooling also works.

Flash with esptool

Install esptool, connect the M5Stack over USB and note its serial port (here COM5 — adjust for your machine):

esptool --chip esp32 --port COM5 --baud 921600 --before default_reset --after hard_reset \
  write_flash -z --flash_mode dio --flash_freq 80m \
  0x1000  Binaries/ESP32_16MB/M5Stack_xDripMon.ino.bootloader.bin \
  0x8000  Binaries/ESP32_16MB/M5Stack_xDripMon.ino.partitions.bin \
  0x10000 Binaries/ESP32_16MB/M5Stack_xDripMon.ino.bin

If the device does not appear as a serial port on Windows, install the CP210x (SiLabs) USB-to-UART driver first.

Building it yourself

To compile from source instead, use the Arduino IDE or arduino-cli with:

  • board package M5Stack 2.1.1 (targets M5Core / M5Fire / M5Core2)
  • libraries M5Unified (with M5GFX) and NimBLE-Arduino 2.x

When the device reboots, continue with Device setup.

Clone this wiki locally