A few days ago can also be a normal download. This download error occurs after updating the firmware library
`Flashing project app to 0x10000...
esptool.py v2.0-dev
Connecting...
Uploading stub...
Running stub...
Stub running...
Attaching SPI flash...
Configuring flash size...
Erasing flash...
Unc size 4224 comp size 2635 comp blocks 3
Wrote 2635 bytes at 0x00001000 in 0.2 seconds (90.3 kbit/s)...
File md5: b8a3654c3478dbe4ee99e418fac4c5b5
Flash md5: b846cfdf358a11fdf47a71901ec3cda1
A fatal error occurred: MD5 of file does not match data in flash!
make: *** [C:/esp32_idf/esp-idf/components/esptool_py/Makefile.projbuild:28锛歠lash] 閿欒 2`
Hi @eboxmaker,
Thanks for reporting this. Do you consistently get the same "Flash md5" value when the flashing fails?
Would it be possible you to please attach the build/bootloader/bootloader.bin file to this issue, if it doesn't contain any sensitive modifications?
Angus
The MD5 errors are the same for every download.
I deleted thebuild folder. Recompile the program to download. The same error occurs.
I did not make any changes to the program.
OK, thanks for clarifying. Can you attach the bootloader.bin file here, please? Mine has a different md5sum, I'm wondering if the bug has something to do with the content.
eboxmaker upload by me bootloader.zip
Hi folks,
I've tried flashing this bootloader image on Windows and Linux, including under current master and esp-idf V0.9. No problems. So I have some follow-up questions to try and narrow it down:
make flash V=1 can you post the full esptool.py command line here, please?make menuconfig serial flasher settings, does anything change?make menuconfig, does anything change?Also, so you know, someone has posted on the esp32.com forum with the same error and md5 values. I'm guessing this is someone else with the same bug.
Thanks,
Angus
Rather than answer the above questions, can you please try esptool.py from this link and report back if flashing succeeds? Thanks.
https://github.com/themadinventor/esptool/tree/bugfix/write_fails_cmp_bit_set
(There are several ways to do this: You can either download esptool.py and run it in place, or you can copy it into the esp-idf/components/esptool_py/esptool directory, or you can navigate to this directory and use git to checkout that branch into the submodule.)
the error is same.
Unc size 4224 comp size 2635 comp blocks 3
Wrote 2635 bytes at 0x00001000 in 0.2 seconds (90.3 kbit/s)...

Hi folks,
Thanks for updating me with the unchanged output. Can you please grab the newest update on the same branch:
https://github.com/themadinventor/esptool/tree/bugfix/write_fails_cmp_bit_set
And try running these two commands:
esptool.py --port PORT read_flash_status
esptool.py --port PORT flash_id
(Please copy or screenshot the output and post it here.)
If that all seems to go well, you can try:
esptool.py --port PORT write_flash_status --non-volatile 0
... and see if you can flash again. Even if it works, could you please post the output from the first two commands - they will be very helpful for tracking down the underlying problem.
Thanks for your patience.
(PS You can reply here or the esp32.com forum, it's not necessary to reply in both places - I'm watching both.)
I just copy the esptool.py to the directory esp-idf/components/esptool_py/esptool, and replace the old esptool.py, It's successful
But It's invalid to use esptool.py command. I am trying. Thanks

OK, the result of esptool.py command as blelow.

Thanks for all the debug output and testing assistance. This bug should be fixed since commit f988dc9 as linked above.
Hey,
I am trying to access the following link to get the new _esptool.py_ because I am encountering the MD5 Flashing error. Unfortunately, the link is not working and showing me "Page not found".
https://github.com/espressif/arduino-esp32/issues/url
Can anyone post the working link?
Thanks!
How to getrid of the error "MD5 of file does not match data in flash!"
Hi,
I had the same problem with a esp32. Than I just disconect all the cables conected to the I/O pins and I tryied to upload again. It worked!
Disconnecting all all wires connected to pins worked for me also...
Thanks https://github.com/ctnalves
Folks, I'm glad that disconnecting I/O wires is fixing this problem.
In particular, pay attention to GPIOs 6-11. These GPIOs are shared with the flash chip in the module, so they can only be used for other external connections under very particular circumstances (and usually not at all). Having them wired up will often prevent the flash chip from working correctly, and can result in this error.
I also ran into this problem and thanks to this thread found that removing the IO connections solved it. But I only had GPIO 12 and 13 connected. I don't see why these would interfere with uploading?
GPIO12 is a bootstrapping pin which sets flash voltage.
@igrr Ok thanks. How are we meant to know that? The pinout diagram (http://www.heltec.cn/download/WIFI_Kit_32-Diagram.pdf) doesn't mention it.
I really think it should clearer which "GPIO" pins are not actually usable as GPIO pins!
This is mentioned, for example, in ESP32 datasheet, section 2.4 "Strapping pins". Note at the end of the section says that GPIO12 needs to have low logic level at startup. Alternatively, if you can not guarantee this, you can permanently set flash voltage to 3.3V, by burning efuses using espefuse.py tool. See https://github.com/espressif/esptool/wiki/espefuse#setting-flash-voltage-vdd_sdio for details.
Once EFUSE is written, you don't need to ensure any specific level of GPIO12 on reset.
@BenUniqcode Please consider forwarding this feedback to Heltec as well, so they can update the diagram for their board to include strapping pins.
Hi,
PIN 12 was a problem in my case. On one device it worked fine, on second one - I hade this error.
Most helpful comment
Hi,
I had the same problem with a esp32. Than I just disconect all the cables conected to the I/O pins and I tryied to upload again. It worked!