Micropython on ESP32
Let's go Flash!
FLashing the ESP32 is similar to flashing the ESP8266. The same tool (esptool.py) is being used and the parameters are almost the same.
Just out of curiosity I used the command esptool.py --port COM35 chip_id to see that the board is being recognized as ESP32 board:
E:\esptool-master>esptool.py --port COM35 chip_id |
and after this, the flash is cleaned with the esptool.py --port COM35 erase_flash command:
E:\esptool-master>esptool.py --port COM35 erase_flash esptool.py v2.1 Connecting.... Detecting chip type... ESP32 Chip is ESP32D0WDQ6 (revision 1) Uploading stub... Running stub... Stub running... Erasing flash (this may take a while)... Chip erase completed successfully in 8.5s Hard resetting... |
You may use a terminal program to see that the flash is empty. When the terminal is opened, you will see the reset messages of the ESP32 being sent in a repeating pattern.
Now you can flash the latest MicroPython image retrieved from micropython.org/download#esp32 using the command esptool.py --port COM35 e--baud 230400 write_flash --flash_mode dio --flash_size=4MB 0x1000 esp32-20170922-v1.9.2-272-g0d1
83d7f.bin. Below the output of this command is shown:
E:\esptool-master>esptool.py --port COM35 --baud 230400 write_flash --flash_mode dio --flash_size=4MB 0x1000 esp32-20170922-v1.9.2-272-g0d18 3d7f.bin esptool.py v2.1 Connecting..... Detecting chip type... ESP32 Chip is ESP32D0WDQ6 (revision 1) Uploading stub... Running stub... Stub running... Changing baud rate to 230400 Changed. Configuring flash size... Compressed 902752 bytes to 566974... Wrote 902752 bytes (566974 compressed) at 0x00001000 in 25.5 seconds (effective 283.6 kbit/s)... Hash of data verified. Leaving... Hard resetting... |
After this the board should reboot in MicroPython:
OSError: [Errno 2] ENOENT MicroPython v1.9.2-272-g0d183d7f on 2017-09-22; ESP32 module with ESP32 Type "help()" for more information. >>> |