Меню

Md5 of file does not match data in flash ошибка

Hardware:

Board: M5Stack with ESP32D0WDQ6
Core Installation/update date: latest
IDE name: Arduino IDE
Flash Frequency: ?40Mhz?
PSRAM enabled: ?no?
Upload Speed: ?921600?
Computer OS: ?Linux Mint?

Description:

Hi, after upload sketchs serveral times for ESP32 module (M5 Stack), I’ve started to receive an error message when I’m trying to upload:

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

A interesting thing is if I upload the same code (same that is already running inside of the ESP32) the upload is completed, when I change just a character on the code I receive that error again.

I already tried with all frequencies, all upload speeds and all flash modes, I don’t know what to do now.
I read several articles on web and issues on GitHub and most of times it seems something related to «Power Issues». But I’m using the USB-C cable connected to a notebook.

After I’ve started to receive this error I’ve uploaded a different codes more than 50 times.

Even a Hello World couldn’t be uploaded.

Arduino IDE LOG:

Sketch uses 1023466 bytes (78%) of program storage space. Maximum is 1310720 bytes.
Global variables use 43644 bytes (13%) of dynamic memory, leaving 284036 bytes for local variables. Maximum is 327680 bytes.
python /home/ventura/.arduino15/packages/esp32/tools/esptool/2.3.1/esptool.py —chip esp32 —port /dev/ttyUSB0 —baud 921600 —before default_reset —after hard_reset write_flash -z —flash_mode dio —flash_freq 80m —flash_size detect 0xe000 /home/ventura/.arduino15/packages/esp32/hardware/esp32/1.0.0/tools/partitions/boot_app0.bin 0x1000 /home/ventura/.arduino15/packages/esp32/hardware/esp32/1.0.0/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 /tmp/arduino_build_306541/mp3withnewurl.ino.bin 0x8000 /tmp/arduino_build_306541/mp3withnewurl.ino.partitions.bin
esptool.py v2.3.1
Connecting….
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 921600
Changed.
Configuring flash size…
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47…

Writing at 0x0000e000… (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 41978.9 kbit/s)…
Hash of data verified.
Compressed 15072 bytes to 9733…

Writing at 0x00001000… (100 %)
Wrote 15072 bytes (9733 compressed) at 0x00001000 in 0.1 seconds (effective 931.7 kbit/s)…
Hash of data verified.
Compressed 1023600 bytes to 578016…

Writing at 0x00010000… (2 %)
Writing at 0x00014000… (5 %)
Writing at 0x00018000… (8 %)
Writing at 0x0001c000… (11 %)
Writing at 0x00020000… (13 %)
Writing at 0x00024000… (16 %)
Writing at 0x00028000… (19 %)
Writing at 0x0002c000… (22 %)
Writing at 0x00030000… (25 %)
Writing at 0x00034000… (27 %)
Writing at 0x00038000… (30 %)
Writing at 0x0003c000… (33 %)
Writing at 0x00040000… (36 %)
Writing at 0x00044000… (38 %)
Writing at 0x00048000… (41 %)
Writing at 0x0004c000… (44 %)
Writing at 0x00050000… (47 %)
Writing at 0x00054000… (50 %)
Writing at 0x00058000… (52 %)
Writing at 0x0005c000… (55 %)
Writing at 0x00060000… (58 %)
Writing at 0x00064000… (61 %)
Writing at 0x00068000… (63 %)
Writing at 0x0006c000… (66 %)
Writing at 0x00070000… (69 %)
Writing at 0x00074000… (72 %)
Writing at 0x00078000… (75 %)
Writing at 0x0007c000… (77 %)
Writing at 0x00080000… (80 %)
Writing at 0x00084000… (83 %)
Writing at 0x00088000… (86 %)
Writing at 0x0008c000… (88 %)
Writing at 0x00090000… (91 %)
Writing at 0x00094000… (94 %)
Writing at 0x00098000… (97 %)
Writing at 0x0009c000… (100 %)
Wrote 1023600 bytes (578016 compressed) at 0x00010000 in 7.8 seconds (effective 1046.9 kbit/s)…
File md5: 90d74b744eb2a8acade99136e4d7ea55
Flash md5: fe0949ec4dd4af242ed642e2781c707d
MD5 of 0xFF is 36ed8c0cd10f63f644ac82d112d814ef

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!

Thank you for your attention.

I have come across this thread in search of some advice. I have seen some related threads but still haven’t cracked the nod on my case.

I am using an ESP32 PICO KIT V4 and code involves dht22 and ultrasonic sensors (x2).

I am using a source code obtained from Instructables to determine the volume of water as a percentage. However, my value differ from the code and when I try and manipulate the calculations regarding determining the distance and compile I get the following error:

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

If the values remain the same the code compiles perfectly. I have gained a few hints on how to resolve the problem but non seem to work/relate. Some advice was to take the 5V and connect to 3,3V?? Is this true and would this need to be done whilst compiling? Some advice was based on the pins; I am using GPIO 22 and 23 for trig1 and echo1 and GPIO 12 and 13 for trig2 and echo2. Since the code runs fine if no alterations arre made I assume it is not the pins. I have also tried changing the value to a multiple of 4 (byte) with no success.

Any advice and direction would be appreciated like ice in the desert.

Hello im currently student and new in esp32
The binary is ESP32 MicroPython esp32-20210902-v1.17.bin
when I install this I get this error:

«C:Program Files (x86)Thonnypython.exe» -u -m esptool —port COM3 erase_flash
esptool.py v3.1
Serial port COM3
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: 7c:9e:bd:45:90:c0
Uploading stub…
Running stub…
Stub running…
Erasing flash (this may take a while)…
Chip erase completed successfully in 0.0s
Hard resetting via RTS pin…
Erasing done

«C:Program Files (x86)Thonnypython.exe» -u -m esptool —port COM3 write_flash —flash_mode keep —flash_size detect 0x1000 C:/Users/CLIENT/Desktop/esp32-20210623-v1.16.bin
esptool.py v3.1
Serial port COM3
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: 7c:9e:bd:45:90:c0
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Auto-detected Flash size: 4MB
Flash will be erased from 0x00001000 to 0x00171fff…
Compressed 1510544 bytes to 976957…
Writing at 0x00001000… (1 %)
Writing at 0x000111e1… (3 %)
Writing at 0x00019c9f… (5 %)
Writing at 0x00022690… (6 %)
Writing at 0x00029089… (8 %)
Writing at 0x00031b4a… (10 %)
Writing at 0x0003d0df… (11 %)
Writing at 0x00047987… (13 %)
Writing at 0x00053b47… (15 %)
Writing at 0x000599d5… (16 %)
Writing at 0x0005f3db… (18 %)
Writing at 0x00064979… (20 %)
Writing at 0x000698ff… (21 %)
Writing at 0x0006e9e0… (23 %)
Writing at 0x00073e23… (25 %)
Writing at 0x00079127… (26 %)
Writing at 0x0007e140… (28 %)
Writing at 0x00082d19… (30 %)
Writing at 0x000886ca… (31 %)
Writing at 0x0008e80b… (33 %)
Writing at 0x00093c3c… (35 %)
Writing at 0x00098e11… (36 %)
Writing at 0x0009ef14… (38 %)
Writing at 0x000a44a4… (40 %)
Writing at 0x000a9a58… (41 %)
Writing at 0x000af8b4… (43 %)
Writing at 0x000b5add… (45 %)
Writing at 0x000bb950… (46 %)
Writing at 0x000c0995… (48 %)
Writing at 0x000c670c… (50 %)
Writing at 0x000cc267… (51 %)
Writing at 0x000d14bc… (53 %)
Writing at 0x000d6384… (55 %)
Writing at 0x000db342… (56 %)
Writing at 0x000e0572… (58 %)
Writing at 0x000e56f9… (60 %)
Writing at 0x000ead9b… (61 %)
Writing at 0x000f0916… (63 %)
Writing at 0x000f6209… (65 %)
Writing at 0x000faeee… (66 %)
Writing at 0x0010094c… (68 %)
Writing at 0x00105da0… (70 %)
Writing at 0x0010b1bd… (71 %)
Writing at 0x001108cb… (73 %)
Writing at 0x00115a6a… (75 %)
Writing at 0x0011af8d… (76 %)
Writing at 0x00120281… (78 %)
Writing at 0x00125957… (80 %)
Writing at 0x0012adc0… (81 %)
Writing at 0x001304ef… (83 %)
Writing at 0x00135d36… (85 %)
Writing at 0x0013b6ed… (86 %)
Writing at 0x00141383… (88 %)
Writing at 0x0014632c… (90 %)
Writing at 0x0014bec4… (91 %)
Writing at 0x00152a2c… (93 %)
Writing at 0x0015ca92… (95 %)
Writing at 0x00162ada… (96 %)
Writing at 0x001680de… (98 %)
Writing at 0x0016d422… (100 %)
Wrote 1510544 bytes (976957 compressed) at 0x00001000 in 86.9 seconds (effective 139.0 kbit/s)…
File md5: c0ddf3b5f2eb47a495c1270f8e33ef5b
Flash md5: 98f7ea6cf80b36d9fa1b08b5ae85d9c5
MD5 of 0xFF is de783540df443b3deb667ac4e7ca8593

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

Write command returned with error code 2

how to get rid this?

У компании есть проект, который использует Wi-Fi, и я сразу подумал о esp8266 и ESP32. Esp32 — очень хороший чип, но информации о проблемах слишком мало, и большинство из них на английском языке. Это действительно сложно для новичков. решить проблемы.

Я не знаю, как запустить make flash, и он не работает, но make app-flash может быть успешным. Я думал, что это проблема проекта, и проект был перенастроен, но все равно не удалось.

Сначала подумал, что это программная ошибка, поэтому стер все данные во флеш-памяти.Это нормально.Если нет загрузки, esp32 станет кирпичом. Baidu посмотрел, но нет никаких связанных проблем, и нет статей по углубленному анализу esp32. Я могу только Google. Мой уровень английского ограничен. После долгих поисков я нашел решение, когда я собирался выбросить эту доску., я попробовал, и я пошел!

Пробовал: просто выполните esptool.py —port <соответствующий номер порта> write_flash_status —non-volatile 0

Потом сделай прошить и реши проблему

Ощущение: esp32 — действительно очень мощный чип, но действительно мало подходящих учебных материалов, и все еще существуют пороговые значения для людей, которые использовали keil для компиляции микроконтроллеров.

Если вы используете Arduino для программирования, сложность уменьшается, но для тех, кто планирует использовать esp32 в реальных проектах, ограничения arduino по-прежнему очевидны.

esp по-прежнему очень популярен за рубежом, и я искренне надеюсь, что Espressif запустит план для студентов колледжей и так далее, который будет популяризирован в Китае.

Just wanted to add my 0.02 here in case someone faces the same issue I did and ends up here after a Google search, like me.

I was trying to flash Tasmota/ESPHome in a Sonoff TX and was facing the same error reported here. To be fair, I had this device running the original firmware for a few months and it stopped working recently, so I knew there was something wrong with it. But I was able to put it into programming mode and it was responding to most commands, so I thought it was worth a shot.

I tried to flash it several times and always got this MD5 mismatch error, and it was always the same MD5 value. After a while playing with the verify_flash command (using the --diff option) I noticed that the bad data always started at the same address: 0x00080000. Starting at that address, all the values returned from the device’s flash memory were 0xff.

This Sonoff has 1 MB of flash and according to the esptool docs it’s divided in two 512KB OTA slots, and the address seems to match the start position for the second slot, so I thought that maybe the second slot was failing somehow (I’m not very familiar with its internal hardware, don’t know exactly if it means the flash memory is divided in two separate chips or something, but it kinda made sense in my head).

Since the ESPHome base image is a bit less than 400KB, I created a custom image configured as if my device only had 512KB of flash, instead of 1MB. Then I tried to flash it using -fs 512KB and it actually finished successfully, with no errors.

I’m still not sure if half of my device’s flash memory just went bad, but the device is now working again and 100% funcional.

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Mcp management service не удается прочитать описание код ошибки 15100
  • Mcfd 0606 коды ошибок