Skip to content
Patrick Sonnerat edited this page Jan 18, 2023 · 6 revisions

Installing with an iOS based computer

This guide explains step by step how to program your M5Stack with the ESPTool utility (Arduino not required).

Install the M5Stack USB driver

If your computer runs a recent iOS version

If you’re running an older iOS version

Allow download and open finder to Downloads, folder Mac_OSX_VCP_Driver, double click the SiLabsUSBDriverDisk.dmg. The disk will extract on your desktop. Open it and run the installer.

Select Open

Click Continue, Continue, Agree to license…

Continue, enter your password, Continue, Open Security Preferences

Unlock the panel (enter your password) and allow the driver, close Security & Privacy

Wait until the install completes and close.

Connect the M5Stack device to your computer.

Install the ESPTool

Install Homebrew

Open a terminal, copy and paste:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Enter your password when required, press RETURN to continue. It will take some time, be patient.

Then enter:

brew install esptool

Wait until the command completes.

Connect your M5Stack to an USB plug of your Mac and enter:

esptool.py flash_id 

If your device is recognized correctly you will get the path of the serial port:

Take note of the port, in this case it is /dev/cu.SLAB_USBtoUART (yours might be different)

Download the latest release

Open this link in a new tab https://github.com/mlukasek/M5_NightscoutMon/releases

Select the .zip file matching your device (Core or Core2) and download it: Note: take the latest release and not the one from the example below

Allow downloads on "github.com" if required.

Once completed open your Download folder and navigate to M5_NightscoutMon below firmwares, inside M5Burner_NightscoutMon

Program the M5Stack

Right click on the folder and select New terminal at folder. A new terminal will open.

If you're using an M5Stack Basic:

Copy and paste the following command verifying the port is identical to the one you noted before:

esptool.py --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_freq 40m 0x1000 bootloader_0x1000.bin 0x10000 M5_NightscoutMon.ino.bin 0x8000 M5_NightscoutMon.ino.partitions.bin

If you're using an M5Stack Core 2:

Copy and paste the following command verifying the port is identical to the one you noted before:

esptool.py --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x7ff000 bootloader_0x1000.bin 0x10000 M5_NightscoutMon.ino.bin 0x8000 M5_NightscoutMon.ino.partitions.bin

Wait until the command completes

Congratulations, you programmed your M5Stack.

Continue with the setup here.