Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading the program occurs MD5 parity error (IDFGH-4188) #50

Closed
eboxmaker opened this issue Oct 10, 2016 · 22 comments
Closed

Downloading the program occurs MD5 parity error (IDFGH-4188) #50

eboxmaker opened this issue Oct 10, 2016 · 22 comments
Assignees

Comments

@eboxmaker
Copy link

eboxmaker commented Oct 10, 2016

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:flash] 错误 2`

@eboxmaker eboxmaker changed the title Downloading the program when MD5 parity error Downloading the program occurs MD5 parity error Oct 10, 2016
@projectgus
Copy link
Contributor

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

@eboxmaker
Copy link
Author

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.

@projectgus
Copy link
Contributor

projectgus commented Oct 10, 2016

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.

@widora
Copy link

widora commented Oct 10, 2016

eboxmaker upload by me bootloader.zip

@projectgus
Copy link
Contributor

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:

  • What serial port are you using? If you run make flash V=1 can you post the full esptool.py command line here, please?
  • What ESP32 hardware do you have connected?
  • If you disable "Compressed Upload" in make menuconfig serial flasher settings, does anything change?
  • If you lower the baud rate (for a very "safe" low value try 9600) in 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

@projectgus
Copy link
Contributor

projectgus commented Oct 13, 2016

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.)

@AnalogLamb
Copy link

AnalogLamb commented Oct 13, 2016

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)...

ss01

@projectgus
Copy link
Contributor

projectgus commented Oct 14, 2016

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.)

@AnalogLamb
Copy link

AnalogLamb commented Oct 14, 2016

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

@AnalogLamb
Copy link

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

esptool_py_cmd

@projectgus projectgus self-assigned this Oct 20, 2016
igrr pushed a commit that referenced this issue Oct 24, 2016
Incorporates fix for locked flash #50
igrr pushed a commit that referenced this issue Oct 24, 2016
Fix flash write protect bug

As reported in github #50 and on forum.

Incorporates other esptool.py changes:
espressif/esptool@197ba60...5c6962e


See merge request !144
@projectgus
Copy link
Contributor

Thanks for all the debug output and testing assistance. This bug should be fixed since commit f988dc9 as linked above.

@architmuchhal12
Copy link

architmuchhal12 commented May 26, 2017

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!

@greeshmarepaka
Copy link

How to getrid of the error "MD5 of file does not match data in flash!"

@ctnalves
Copy link

ctnalves commented Mar 8, 2018

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!

@veestrc
Copy link

veestrc commented Apr 20, 2018

Disconnecting all all wires connected to pins worked for me also...
Thanks https://github.com/ctnalves

@projectgus
Copy link
Contributor

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.

@BenUniqcode
Copy link

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?

@igrr
Copy link
Member

igrr commented Jun 20, 2018

GPIO12 is a bootstrapping pin which sets flash voltage.

@BenUniqcode
Copy link

@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!

@igrr
Copy link
Member

igrr commented Jun 20, 2018

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.

@projectgus
Copy link
Contributor

@BenUniqcode Please consider forwarding this feedback to Heltec as well, so they can update the diagram for their board to include strapping pins.

igrr pushed a commit that referenced this issue Dec 5, 2018
Fix various errors for menuconfig on Windows

Closes #50

See merge request idf/esp-idf!3848
@dave88PL
Copy link

Hi,
PIN 12 was a problem in my case. On one device it worked fine, on second one - I hade this error.

@github-actions github-actions bot changed the title Downloading the program occurs MD5 parity error Downloading the program occurs MD5 parity error (IDFGH-4188) Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants