-
Notifications
You must be signed in to change notification settings - Fork 153
Mac
This guide explains step by step how to program your M5Stack with the ESPTool utility (Arduino not required).
- Go here: https://docs.m5stack.com/#/en/arduino/arduino_development and download the driver.
- If the driver above doesn't work (Big Sur and upwards), you can find alternative drivers (CH9202 and CH341SER) here: https://github.com/m5stack/M5EPD/issues/47
- Go to of SiLabs https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers and choose the version matching your operating system.
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.
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)
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
Right click on the folder and select New terminal at folder. A new terminal will open.
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
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.