Categories
ESP32 Microcontrollers MicroPython

Flash MicroPython Firmware

Download firmware for Generic ESP32 module

https://micropython.org/download/esp32/

Install esptool.py

pip install esptool

Assumed the USB-Serial chip driver has been installed. Check the Operating System platform (Win/MacOS/Linux) port assignment for the attached MCU board via USB port.

On MacOS (Intel) : sudo ls -al /dev/tty.*

Erase the firmware (flash)

esptool.py --port /dev/tty.SLAB_USBtoUART erase_flash

Deploy the new firmware (recent downloaded esp32-xxx-xxx.bin file) to flash address 0x1000

esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART write_flash  -z 0x1000 esp32-20180511-v1.9.4.bin

Test MicroPython (REPL)

On MacOS (Intel): screen command

screen /dev/tty.SLAB_USBtoUART 1152000

>>>

Ctrl + a and Ctrl + k and y to kill the terminal session

Resources

https://docs.micropython.org/en/v1.15/esp32/tutorial/intro.html