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 |
Preparation: connecting the device
Section titled “Preparation: connecting the device”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.
Installing with the Web Flasher
Section titled “Installing with the Web Flasher”Open the Web Flasher page and click “Connect and install”. See that page for details.
Installing with esptool
Section titled “Installing with esptool”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.binWith older esptool versions (v4 and earlier), the command is esptool.py and the subcommand is write_flash.
Building and uploading with PlatformIO
Section titled “Building and uploading with PlatformIO”Install PlatformIO, get the repository, and run the following commands:
git clone https://github.com/waganeko-dev/m5-grayline.gitcd m5-graylinepio run -t uploadTo choose the port, add --upload-port <port>. For more about building, see docs/DEVELOPMENT.md in the repository (in Japanese).
After installing
Section titled “After installing”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).