ESP32 flashing problem

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hiase
Normal user
Posts: 5
Joined: 02 May 2020, 15:49

ESP32 flashing problem

#1 Post by hiase » 02 May 2020, 16:03

Hello all, I've been struggling with flashing this device: https://www.az-delivery.de/products/esp-32-dev-kit-c-v4

I've tried to flash it using ESPEasy_mega-20200426 version (and some older ones). When I start flashing it with ESP.Easy.Flasher program from Windows, everything seems to go ok and after about 20 seconds I get a message: Done.. 1 errors during flash. The log says this:

[2.5.2020 16.58.57] Uploading 1786224 bytes from C:\Users\xyz\Downloads\ESPEasy_mega-20200426\bin\ESP_Easy_mega-20200426_test_ESP32_4M316k.bin to flash at 0x00000000
[2.5.2020 16.58.57] erasing flash
[2.5.2020 16.58.57] size: 1b4170 address: 000000
[2.5.2020 16.58.57] first_sector_index: 0
[2.5.2020 16.58.57] total_sector_count: 437
[2.5.2020 16.58.57] head_sector_count: 16
[2.5.2020 16.58.57] adjusted_sector_count: 421
[2.5.2020 16.58.57] erase_size: 1a5000
[2.5.2020 16.58.57] espcomm_send_command: sending command header
[2.5.2020 16.58.57] espcomm_send_command: sending command payload
[2.5.2020 16.58.57] setting serial port timeouts to 16788 ms
[2.5.2020 16.58.57] read 0, requested 1
[2.5.2020 16.58.57] setting serial port timeouts to 1000 ms
[2.5.2020 16.58.57] warning: espcomm_send_command: didn't receive command response
[2.5.2020 16.58.57] warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
[2.5.2020 16.58.57] closing bootloader
[2.5.2020 16.58.57] flush start
[2.5.2020 16.58.57] setting serial port timeouts to 1 ms
[2.5.2020 16.58.57] setting serial port timeouts to 1000 ms
[2.5.2020 16.58.57] flush complete
[2.5.2020 16.58.57] error: espcomm_upload_mem failed
[2020-05-02 16:58:57] DONE! BUT WITH (1) ERRORS!

Could anyone help me with this? Thanks! I've been able to flash ESP8266 devices without problems but this ESP32 seems to be a bit of a struggle for me.

User avatar
Ath
Normal user
Posts: 121
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32 flashing problem

#2 Post by Ath » 02 May 2020, 16:17

At first my ESP32's didn't want to flash either following your procedure, as it seems the UART method of bringing them into flash-mode doesn't work.
My current procedure is to bring them into flash-mode by holding down the Boot button, shortly pressing the EN button, hold down for a few more seconds and then release the Boot button. Now the flashing can commence! It's a bit cumbersome, but it works all the time :)
NB: ESPEasy allows for OTA firmware updates, so you should only have to bother with this for 1 time (per device) :D

hiase
Normal user
Posts: 5
Joined: 02 May 2020, 15:49

Re: ESP32 flashing problem

#3 Post by hiase » 02 May 2020, 16:44

Ath wrote:
02 May 2020, 16:17
At first my ESP32's didn't want to flash either following your procedure, as it seems the UART method of bringing them into flash-mode doesn't work.
My current procedure is to bring them into flash-mode by holding down the Boot button, shortly pressing the EN button, hold down for a few more seconds and then release the Boot button. Now the flashing can commence! It's a bit cumbersome, but it works all the time :)
NB: ESPEasy allows for OTA firmware updates, so you should only have to bother with this for 1 time (per device) :D
Thanks for the reply! If I understood correctly, this is the way how you have been successful:
-hold down BOOT, keep it pressed down
-press EN shortly, then push EN for a longer time
-finally release BOOT
-Flash the ESP from software

I tried this and unfortunately my result was same than earlier. I then opened Serial Monitor and saw that when pressing the buttons like you described puts the device in correct mode:

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download


Or this is what I think.. Any pointers? :D

User avatar
Ath
Normal user
Posts: 121
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32 flashing problem

#4 Post by Ath » 02 May 2020, 17:28

You can wait to put it into Flash-mode until it actually is trying to connect, it might be looking for the 'download' message to be sent before it starts to actually flash.

(I'm usually uploading from VSCode after a build, and just bring it into Flash-mode when it starts connecting...)

hiase
Normal user
Posts: 5
Joined: 02 May 2020, 15:49

Re: ESP32 flashing problem

#5 Post by hiase » 02 May 2020, 18:28

Thanks again. Unfortunately I can't get it working even I try to enable the flash mode after the actual flashing is started from Esp Easy Flasher. Maybe the next thing I could try is to get the ESP to flash mode via GPIO pins, have you ever tried that?

TD-er
Core team member
Posts: 2881
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 flashing problem

#6 Post by TD-er » 02 May 2020, 20:02

I have not been able to flash ESP32 with ESPEasy Flasher too.
There are other tools for ESP32, which also allow for using multiple bin files and an offset per bin file.
In the recent builds (don't use ESP32 of the last nightly, but rather use the one in 20200410) there is a 'factory' binary included which can be flashed as a single file starting from offset 0.

hiase
Normal user
Posts: 5
Joined: 02 May 2020, 15:49

Re: ESP32 flashing problem

#7 Post by hiase » 05 May 2020, 14:04

TD-er wrote:
02 May 2020, 20:02
I have not been able to flash ESP32 with ESPEasy Flasher too.
There are other tools for ESP32, which also allow for using multiple bin files and an offset per bin file.
In the recent builds (don't use ESP32 of the last nightly, but rather use the one in 20200410) there is a 'factory' binary included which can be flashed as a single file starting from offset 0.
Thank you, I will have to try this next. I found some info from Expressif website: https://www.espressif.com/en/products/s ... /resources There is a Download Tool that supports multiple bin files. Though, I am not sure about the offset-values and how to set them in this case. Could you provide more information how you got yours working? Thanks!

TD-er
Core team member
Posts: 2881
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 flashing problem

#8 Post by TD-er » 06 May 2020, 23:51

hiase wrote:
05 May 2020, 14:04
TD-er wrote:
02 May 2020, 20:02
I have not been able to flash ESP32 with ESPEasy Flasher too.
There are other tools for ESP32, which also allow for using multiple bin files and an offset per bin file.
In the recent builds (don't use ESP32 of the last nightly, but rather use the one in 20200410) there is a 'factory' binary included which can be flashed as a single file starting from offset 0.
Thank you, I will have to try this next. I found some info from Expressif website: https://www.espressif.com/en/products/s ... /resources There is a Download Tool that supports multiple bin files. Though, I am not sure about the offset-values and how to set them in this case. Could you provide more information how you got yours working? Thanks!
In the new build system (no nightly builds made with it yet) there will be 2 files for each ESP32 build:
https://www.dropbox.com/s/siuh9iyrq8reu ... y.bin?dl=0
https://www.dropbox.com/s/z2i4fxim7l7sv ... k.bin?dl=0

The -factory.bin build will be the one you need to flash via serial and use 0 as offset.
No other bin files needed

The bin without -factory is the one you can use for OTA updates.

The files I just linked are just built on my computer based on the current state of the mega branch, so they are as new as you can have them.

hiase
Normal user
Posts: 5
Joined: 02 May 2020, 15:49

Re: ESP32 flashing problem

#9 Post by hiase » 08 May 2020, 10:37

TD-er wrote:
06 May 2020, 23:51
hiase wrote:
05 May 2020, 14:04
TD-er wrote:
02 May 2020, 20:02
I have not been able to flash ESP32 with ESPEasy Flasher too.
There are other tools for ESP32, which also allow for using multiple bin files and an offset per bin file.
In the recent builds (don't use ESP32 of the last nightly, but rather use the one in 20200410) there is a 'factory' binary included which can be flashed as a single file starting from offset 0.
Thank you, I will have to try this next. I found some info from Expressif website: https://www.espressif.com/en/products/s ... /resources There is a Download Tool that supports multiple bin files. Though, I am not sure about the offset-values and how to set them in this case. Could you provide more information how you got yours working? Thanks!
In the new build system (no nightly builds made with it yet) there will be 2 files for each ESP32 build:
https://www.dropbox.com/s/siuh9iyrq8reu ... y.bin?dl=0
https://www.dropbox.com/s/z2i4fxim7l7sv ... k.bin?dl=0

The -factory.bin build will be the one you need to flash via serial and use 0 as offset.
No other bin files needed

The bin without -factory is the one you can use for OTA updates.

The files I just linked are just built on my computer based on the current state of the mega branch, so they are as new as you can have them.
Thank you very much, I got it working now with your advice!

PS. I saw that they added iButton support, hmm interesting.. I have one iButton reader lying around, gotta test if it can be used to build access control.

venti
Normal user
Posts: 4
Joined: 31 Jul 2020, 12:32

Re: ESP32 flashing problem

#10 Post by venti » 31 Jul 2020, 12:37

I am doing something wrong? I brought me module into flash mode, verified by looking at the serial output via putty while pressing the buttons.
Now the flashing just does nothing, goes on and on

Wrong baud rate?
Should there be info read out in the "Detected info" box?

I am trying to flash a ESP-WROOM-32 DO1T ESP 32 DEVKIT V 1
Capture.PNG
Capture.PNG (222.56 KiB) Viewed 396 times

venti
Normal user
Posts: 4
Joined: 31 Jul 2020, 12:32

Re: ESP32 flashing problem

#11 Post by venti » 31 Jul 2020, 12:49

Update: When I press the BOOT-EN-BOOT combo during this sync process, something happens.
The result is an efuse error. Strange.
Capture2.PNG
Capture2.PNG (118.39 KiB) Viewed 392 times

venti
Normal user
Posts: 4
Joined: 31 Jul 2020, 12:32

Re: ESP32 flashing problem

#12 Post by venti » 31 Jul 2020, 14:20

I could fix it by using another tool:
https://github.com/espressif/esptool
Could easily flash the firmware with that without efuse error. Webinterface came up shortly after flashing with this parameters

Code: Select all

esptool.exe --port COM5 write_flash 0x00000 C:\Users\venti\Downloads\ESP32_flash\ESPEasy_ESP32_mega-20200721\bin\ESP_Easy_mega_20200721_test_ESP32_4M316k-factory.bin
Capture3.PNG
Capture3.PNG (25.41 KiB) Viewed 382 times
Capture4.PNG
Capture4.PNG (116.81 KiB) Viewed 382 times

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests