MD5 of file doas not match data in flash ( fatal error )

kasra75
Posts: 3
Joined: Wed Dec 27, 2017 2:38 pm

MD5 of file doas not match data in flash ( fatal error )

Postby kasra75 » Wed Dec 27, 2017 5:03 pm

Hello everyone,

i get this error when trying to upload my sketch : A fatal error occurred: MD5 of file does not match data in flash!

here is the complete log :

esptool.py v2.1
Connecting........_
Chip is ESP32D0WDQ6 (revision 0)
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Warning: Could not auto-detect Flash size (FlashID=0x0, SizeID=0x0), defaulting to 4MB
Compressed 8192 bytes to 47...

Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 9362.3 kbit/s)...
File md5: e6327541e2dc394ca2c3b3280ac0f39f
Flash md5: a4a128c2e76bca618746b1a172a1229e
MD5 of 0xFF is 84d04c9d6cc8ef35bf825d51a5277699

A fatal error occurred: MD5 of file does not match data in flash!
A fatal error occurred: MD5 of file does not match data in flash!

The code did'nt change at all ( i am able to upload it in another board )

My "hardware" knowedge is not great could you please help meto understand what is that mean and how to fix it ?

informations about my environement :
IDE : Arduino ide 1.8.5 with the arduino-esp-32 pluged on it.
my board is a WEMOS LOLIN32

Best Regards,

Kasra

ESP_Angus
Posts: 2278
Joined: Sun May 08, 2016 4:11 am

Re: MD5 of file doas not match data in flash ( fatal error )

Postby ESP_Angus » Wed Dec 27, 2017 10:11 pm

Hi Kasra,

This means that after esptool.py wrote the new binary to the flash it read back the contents and it didn't match. So something was corrupted, or write protection prevented the flash from being updated.

Probably a more concerning warning is this:

Code: Select all

Warning: Could not auto-detect Flash size (FlashID=0x0, SizeID=0x0), defaulting to 4MB
This indicates that the flash isn't properly responding to commands at all (FlashID and SizeID should be non-zero values.)

Has this LOLIN32 board ever worked successfully? Is anything connected to any of the GPIO pins of the board, in particular the GPIOs which are used by the internal SPI flash -numbers 6, 7, 8, 9, 10, 11?

kasra75
Posts: 3
Joined: Wed Dec 27, 2017 2:38 pm

Re: MD5 of file doas not match data in flash ( fatal error )

Postby kasra75 » Thu Dec 28, 2017 11:46 am

Hello,

Thanks a lot for your answer .

Yes the boards were working when pluged it for the first time ( there is always a little demo in the screen ) .
Then i was able to upload the code .

Here is the exact board that i have : http://www.instructables.com/id/ESP32-W ... ting-Star/

And according to the picture, GPIOs that are used by the internal SPI flash where free ( nothing was pluged on GPIO 6,7,8,11).
i don't see GPIO 9 and 10 as the picture is showing.
But i can't upload anything now. I just have the code of my first upload on it, but i can't do anything else .
The GPIO that are used are : 16 , 2 , 13,12,15 ( all are in the right side of the board ) and Yes they are connected during the process of upload.

i attached 2 pictures for showing you the exact schema.
I used 2 different boards, and when i try to upload something on these boards i have 2 different fatal error.
For the first board ( first picture ) i have the MD5 fatal error that i send to you on my first message whenever i try to upload something. As you can see when i plug the board the program that is into it ( from the very first upload ) is not starting.


for the second board
i have another fatal error whenever i try to upload again :

esptool.py v2.1
Connecting........_
Chip is ESP32D0WDQ6 (revision 0)
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Warning: Could not auto-detect Flash size (FlashID=0x0, SizeID=0x0), defaulting to 4MB
Compressed 8192 bytes to 47...

Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 7281.7 kbit/s)...

A fatal error occurred: Timed out waiting for packet header
A fatal error occurred: Timed out waiting for packet header



But as you can see on the picture the program is starting ( you can see the "OFF" message which is from my code )
Is it a way to reinitialze everything ? it's important for me to understand what bad actions i did to not reproduce them.
if you have a tutorial or documents that shows how to reinitilize the board it would be nice ;) .
If you have an answer it's even better lol. i just hope that i didn't kill the boards.

thanks again,

have a nice day.
Kasra
Attachments
second.jpg
second.jpg (1.74 MiB) Viewed 17931 times
first.jpg
first.jpg (2.11 MiB) Viewed 17931 times

kasra75
Posts: 3
Joined: Wed Dec 27, 2017 2:38 pm

Re: MD5 of file doas not match data in flash ( fatal error )

Postby kasra75 » Fri Dec 29, 2017 10:57 am

for the MD5 of file that does not match data in flash,

here is the complete command line . Just in case it could help.

C:\Users\User\Documents\Arduino\hardware\espressif\esp32/tools/esptool.exe
--chip esp32
--port COM10
--baud 921600
--before default_reset
--after hard_reset write_flash -z
--flash_mode dio
--flash_freq 80m
--flash_size detect
0xe000 C:\Users\User\Documents\Arduino\hardware\espressif\esp32/tools/partitions/boot_app0.bin
0x1000 C:\Users\User\Documents\Arduino\hardware\espressif\esp32/tools/sdk/bin/bootloader_dio_80m.bin
0x10000 C:\Users\User\AppData\Local\Temp\arduino_build_277135/SimpleWiFiServer.ino.bin
0x8000 C:\Users\User\AppData\Local\Temp\arduino_build_277135/SimpleWiFiServer.ino.partitions.bin

thanks,
Kasra

WiFive
Posts: 3077
Joined: Tue Dec 01, 2015 7:35 am

Re: MD5 of file doas not match data in flash ( fatal error )

Postby WiFive » Sat Dec 30, 2017 1:50 am

Read esp32 datasheet strapping pins section. 15 and more importantly 2 and 12 are strapping pins.

ucpatnaik
Posts: 1
Joined: Wed Jan 27, 2021 1:00 pm

Re: MD5 of file doas not match data in flash ( fatal error )

Postby ucpatnaik » Wed Jan 27, 2021 1:10 pm

After a lot of studies, I am now convinced that the file MD5 has gone corrupt while Esp32 was on program mode because of a 5-volt power glitch that was caused by a defective power source, so at the beginning of loading the requested file asked in return does not match and thus it does not allow loading but the old program remains. As the chip is write-protected my esp32 (30 pins)now is a brick. Fingers crossed till I receive a new one. Don't waste your time.. You have lost it. :roll:

Who is online

Users browsing this forum: No registered users and 7 guests