Help with ESP32 micropython flashing!

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
SASM
Posts: 6
Joined: Thu Feb 08, 2018 11:28 pm

Help with ESP32 micropython flashing!

Post by SASM » Thu Feb 08, 2018 11:36 pm

Just started using a dev board for the esp32 and erased its flash. Then flashed it using the following command:

- esptool.py --port COM5 --baud 115200 write_flash --flash_size=detect 0 pathToYourFile/binaryFile

Afterwards connected it via Putty and got the following, just after erasing the flash and then flashing the esp32:


rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371

Don't know why I get this error, help please.

User avatar
mattyt
Posts: 410
Joined: Mon Jan 23, 2017 6:39 am

Re: Help with ESP32 micropython flashing!

Post by mattyt » Fri Feb 09, 2018 3:55 am

It depends a little on which board you're using but changing the '0' to '0x1000' (start of firmware address) is probably the main argument that looks incorrect. You may also need to add "--chip esp32" too, I can't recall if esptool detects the chipset.

This post covers, with a little more detail, how to write firmware for a handful of the Espressif boards, the pertinent part for the ESP32 is:

Code: Select all

esptool.py --chip esp32 -p $(PORT) --baud $(BAUD) write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 $(MICROPYTHON_BIN)
Hope that helps!

User avatar
tuupola
Posts: 54
Joined: Sun Sep 17, 2017 12:10 am
Contact:

Re: Help with ESP32 micropython flashing!

Post by tuupola » Sun Feb 11, 2018 7:56 am

I wrote instructions on flashing M5Stack few days ago. TL;DR try erasing flash first and lower baud rate.

Code: Select all

$ esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 --after no_reset erase_flash
$ esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 write_flash --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 esp32-20180127-v1.9.3-240-ga275cb0f.bin

Post Reply