MD5 of file doas not match data in flash ( fatal error )
MD5 of file doas not match data in flash ( fatal error )
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
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
Re: MD5 of file doas not match data in flash ( fatal error )
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:
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?
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
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?
Re: MD5 of file doas not match data in flash ( fatal error )
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
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 (1.74 MiB) Viewed 183054 times
-
- first.jpg (2.11 MiB) Viewed 183054 times
Re: MD5 of file doas not match data in flash ( fatal error )
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
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
Re: MD5 of file doas not match data in flash ( fatal error )
Read esp32 datasheet strapping pins section. 15 and more importantly 2 and 12 are strapping pins.
Re: MD5 of file doas not match data in flash ( fatal error )
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.
Re: MD5 of file doas not match data in flash ( fatal error )
The threat in my case has been solved accidentally. The board was Ai-Thinker ESP32-CAM, The GPIO3 has been grounded (flash mode set) and the power GND has been disconnected. The flashing gone successful. Magic!
Re: MD5 of file doas not match data in flash ( fatal error )
For me, just removing the connection of GPIO12 fixed this issue.
-
- Posts: 2
- Joined: Sun Nov 21, 2021 3:49 am
Re: MD5 of file doas not match data in flash ( fatal error )
Hello! I have a similar problem. I may have touched the wrong pins when debugging a soldered breadboard. The test sketch I was using seems to have been permanently written to somewhere on my ESP32-WROOM-32. I'm trying to erase everything and bring back factory condition. This is my latest attempt using a USB cable to connect to the ESP:
$ sudo python /home/johnz/.local/lib/python3.8/site-packages/esptool.py --chip auto --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0 factory/factory_WROOM-32.bin
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting.....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:4f:33:6b:a4:29
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x003fffff...
Compressed 4194304 bytes to 942887...
Wrote 4194304 bytes (942887 compressed) at 0x00000000 in 86.8 seconds (effective 386.3 kbit/s)...
File md5: a595121b6aa7426e533006344d547440
Flash md5: d37302d28a3ce07290a5faabb8567d54
MD5 of 0xFF is 2b7a70fa59f8173635bcbe956bad56c6
A fatal error occurred: MD5 of file does not match data in flash!
Have I bricked my ESP? Do I need to get a serial to USB converter and use certain pins to upload?
$ sudo python /home/johnz/.local/lib/python3.8/site-packages/esptool.py --chip auto --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0 factory/factory_WROOM-32.bin
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting.....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:4f:33:6b:a4:29
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x003fffff...
Compressed 4194304 bytes to 942887...
Wrote 4194304 bytes (942887 compressed) at 0x00000000 in 86.8 seconds (effective 386.3 kbit/s)...
File md5: a595121b6aa7426e533006344d547440
Flash md5: d37302d28a3ce07290a5faabb8567d54
MD5 of 0xFF is 2b7a70fa59f8173635bcbe956bad56c6
A fatal error occurred: MD5 of file does not match data in flash!
Have I bricked my ESP? Do I need to get a serial to USB converter and use certain pins to upload?
-
- Posts: 2
- Joined: Sun Nov 21, 2021 3:49 am
Re: MD5 of file doas not match data in flash ( fatal error )
Following this thread:
https://githubmemory.com/repo/espressif ... issues/662
I eventually tried:
$ sudo python /home/johnz/.local/lib/python3.8/site-packages/esptool.py write_flash_status --non-volatile 0
esptool.py v3.2
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:4f:33:6b:a4:29
Uploading stub...
Running stub...
Stub running...
Initial flash status: 0x6200
Setting flash status: 0x0000
After flash status: 0x2000
Hard resetting via RTS pin...
I was then able to run:
$ sudo python /home/johnz/.local/lib/python3.8/site-packages/esptool.py --chip auto --port /dev/ttyUSB0 --baud 115200 --before default_reset --no-stub --after hard_reset write_flash -u --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0 factory/factory_WROOM-32.bin
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting......
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:4f:33:6b:a4:29
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x003fffff...
Erasing flash...
Took 5.74s to erase flash block
Wrote 4194304 bytes at 0x00000000 in 404.4 seconds (83.0 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Fixed the problem! I am now able to upload new sketches using the Arduino IDE.
https://githubmemory.com/repo/espressif ... issues/662
I eventually tried:
$ sudo python /home/johnz/.local/lib/python3.8/site-packages/esptool.py write_flash_status --non-volatile 0
esptool.py v3.2
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:4f:33:6b:a4:29
Uploading stub...
Running stub...
Stub running...
Initial flash status: 0x6200
Setting flash status: 0x0000
After flash status: 0x2000
Hard resetting via RTS pin...
I was then able to run:
$ sudo python /home/johnz/.local/lib/python3.8/site-packages/esptool.py --chip auto --port /dev/ttyUSB0 --baud 115200 --before default_reset --no-stub --after hard_reset write_flash -u --flash_mode dio --flash_freq 40m --flash_size 4MB 0x0 factory/factory_WROOM-32.bin
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting......
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c4:4f:33:6b:a4:29
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x003fffff...
Erasing flash...
Took 5.74s to erase flash block
Wrote 4194304 bytes at 0x00000000 in 404.4 seconds (83.0 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Fixed the problem! I am now able to upload new sketches using the Arduino IDE.
Who is online
Users browsing this forum: No registered users and 27 guests