Skip to content

Installing the firmware

You can install the firmware in one of the following ways.

Method Requirements Best for
Web Flasher Google Chrome or Microsoft Edge The easiest way
esptool Python and esptool Command-line users
PlatformIO PlatformIO Building from source

M5Stack Basic V2.6 uses a CH9102 USB-to-serial chip. Depending on your operating system, you may need to install the CH9102 driver. Get it from the official M5Stack documentation.

When the device is connected, a serial port appears. Its name depends on the operating system:

  • Windows: COM3, etc.
  • macOS: /dev/cu.usbserial-XXXXXXXX, etc.
  • Linux: /dev/ttyUSB0, etc.

Open the Web Flasher page and click “Connect and install”. See that page for details.

Each release on GitHub Releases has two files:

File Address Contents
m5-grayline-vX.Y.Z-full.bin 0x0 Full image: bootloader, partition table and application
m5-grayline-vX.Y.Z-app.bin 0x10000 Application only, for updating a device that already runs m5-grayline

For the first installation, use the full image. Install esptool (pip install esptool) and run the following command, replacing <port> with the serial port of the device:

ターミナルウィンドウ
esptool --chip esp32 --port <port> --baud 921600 write-flash 0x0 m5-grayline-vX.Y.Z-full.bin

With older esptool versions (v4 and earlier), the command is esptool.py and the subcommand is write_flash.

Install PlatformIO, get the repository, and run the following commands:

ターミナルウィンドウ
git clone https://github.com/waganeko-dev/m5-grayline.git
cd m5-grayline
pio run -t upload

To choose the port, add --upload-port <port>. For more about building, see docs/DEVELOPMENT.md in the repository (in Japanese).

The device restarts and shows a startup message at the bottom of the screen. If a microSD card is inserted, /grayline/config.json is created automatically. Continue with Configuration (config.json).