Esp32 a fatal error occurred 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? D...

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.

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

Hello.

I am currently using the esp32-wrover-E product. And I am using version 4.1.1 of esp-idf which is published on Github.

I want to update the firmware of esp32-wrover-E.

However, when I run idf.py -p COM30 flash, the following error occurs.

Code: Select all

[1/4] cmd.exe /C "cd /D C:UsersrobocareDesktopinteractive_tool_ws007lcd_sd_test_2020_10_14_001_030buildesp-idfpartition_table && C:Usersrobocare.espressiftoolscmake3.13.4bincmake.exe -E echo "Partition table binary generated. Contents:" && C:Usersrobocare.espressiftoolscmake3.13.4bincmake.exe -E echo ******************************************************************************* && python C:/Users/robocare/Desktop/esp-idf-4/components/partition_table/gen_esp32part.py -q --offset 0x8000 --flash-size 4MB C:/Users/robocare/Desktop/interactive_tool_ws007/lcd_sd_test_2020_10_14_001_030/build/partition_table/partition-table.bin && C:Usersrobocare.espressiftoolscmake3.13.4bincmake.exe -E echo *******************************************************************************"
Partition table binary generated. Contents:
*******************************************************************************
# Espressif ESP32 Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,3800K,
*******************************************************************************
[2/4] Performing build step for 'bootloader'
ninja: no work to do.
esptool.py -p COM36 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 spi_master.bin
esptool.py v2.9-dev
Serial port COM36
Connecting....
Chip is ESP32D0WDQ5 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:d7:eb:67:5a:1c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 3072 bytes to 105...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (105 compressed) at 0x00008000 in 0.0 seconds (effective 4109.7 kbit/s)...
File  md5: 375c2c5c520586874726174d1bb2faee
Flash md5: 988a096f6bee866b744ec2be0247ba9e
MD5 of 0xFF is 988a096f6bee866b744ec2be0247ba9e

A fatal error occurred: MD5 of file does not match data in flash!
Adding "flash"'s dependency "all" to list of commands with default set of options.
Executing action: all (aliases: build)
Running ninja in directory c:usersrobocaredesktopinteractive_tool_ws007lcd_sd_test_2020_10_14_001_030build
Executing "ninja all"...
Executing action: flash
Running esptool.py in directory c:usersrobocaredesktopinteractive_tool_ws007lcd_sd_test_2020_10_14_001_030build
Executing "C:Usersrobocare.espressifpython_envidf4.1_py3.8_envScriptspython.exe C:/Users/robocare/Desktop/esp-idf-4/components/esptool_py/esptool/esptool.py -p COM36 -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash @flash_project_args"...
esptool.py failed with exit code 2

When the above error occurred, the method I tried was to enter the following command in the command window, and the following result was obtained.

Code: Select all

esptool.py v3.2
Serial port COM30
Connecting.....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:d7:eb:67:5a:1c
Uploading stub...
Running stub...
Stub running...
Initial flash status: 0x0200
Setting flash status: 0x0000
After flash status:   0x0200
Hard resetting via RTS pin...

Another strange thing is that when the following command is entered in the command window, the following phenomenon does not occur for Manufacturer: 20(Device :4017, Detected flash size : 8MB), only Manufacturer: C8(Device :4017, Detected flash size : 8MB).

If you know a solution, please help.

Thank you.

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?

This post shows how to flash MicroPython firmware on ESP32/ESP8266 boards using the esptool.py. It works on Windows, Mac OS X, and Linux. For the official documentation, you can visit the esptool.py GitHub page.

Tip: for an easier method to flash the ESP32/ESP8266 with MicroPython, we recommend reading this guide to flash MicroPython with uPyCraft IDE. However, we’ve recently received comments from our readers about having trouble installing/using uPyCraft IDE. For that reason, we’re posting an alternative method using the esptool.py software.

Installing esptool.py in your computer

To work with esptool.py, you’ll need either Python 2.7, Python 3.4 or a newer Python installation on your system. We recommend using Python 3.7.X, so go to Python’s website and install it on your computer.

With Python 3 installed, open a Terminal window and install the latest stable esptool.py release with pip:

pip install esptool

Note: with some Python installations that command may not work and you’ll receive an error. If that’s the case, try to install esptool.py with:

  • pip3 install esptool
  • python -m pip install esptool
  • pip2 install esptool

Setuptools is also a requirement that is not available on all systems by default. You can install it with the following command:

pip install setuptools

After installing, you will have esptool.py installed into the default Python executables directory and you should be able to run it with the command esptool.py. In your Terminal window, run the following command:

python -m esptool

If it was installed properly, it should display a similar message (regardless of your operating system):

With esptool.py installed on your computer, you can easily flash your ESP32 or ESP8266 boards with the MicroPython firmware. This post is divided into two parts, read Part 1 or Part 2 depending on your board:

  • Part 1 – ESP32
  • Part 2 – ESP8266

Note: after installing MicroPython firmware on your ESP32 or ESP8266, you can go back and use Arduino IDE again. You just need to upload code using Arduino IDE. Then, if you want to use MicroPython again, you need to flash MicroPython firmware.

[Part 1 – ESP32] Downloading and Flashing the MicroPython Firmware on ESP32

To download the latest version of MicroPython firmware for the ESP32, go to the MicroPython Downloads page and scroll all the way down to the ESP32 section.

You should see a similar web page (see figure below) with links to download .bin files. Download the latest release. At the time of writing this article, the latest release is v1.17 (2021-02-02).bin. Don’t download the Nighlty builds; those versions are not stable and are only recommended for advanced programmers.

Download MicroPython Firmware

Note: if you’re using a different board (like a PyBoard, WiPy, or other), go to MicroPython Downloads page and download the right firmware for your board.

Finding the Serial Port Name

It’s a bit different to find the Serial port name in each operating system, so for simplicity reasons we recommend finding your ESP serial port name through the Arduino IDE. Follow these steps:

  1. Connect your board to your computer
  2. Open the Arduino IDE
  3. Go to Tools > Port
  4. Save your ESP32 serial port name (in our case it’s COM7)
  5. Close your Arduino IDE software

Important: if you plug your ESP32 board into your computer, but you can’t find the ESP32 Port available in your Arduino IDE, it might be one of these two problems: 1. USB drivers missing or 2. USB cable without data wires.

1. If you don’t see your ESP’s COM port available, this often means you don’t have the USB drivers installed. Take a closer look at the chip next to the voltage regulator on board and check its name.

The ESP32 DEVKIT V1 DOIT board uses the CP2102 chip.

Go to Google and search for your specific chip to find the drivers and install them in your operating system.

You can download the CP2102 drivers on the Silicon Labs website.

After they are installed, restart the Arduino IDE and you should see the serial port in the Tools > Port menu.

2. If you have the drivers installed, but you can’t see your device, double-check that you’re using a USB cable with data wires.

USB cables from powerbanks often don’t have data wires (they are charge only). So, your computer will never establish a serial communication with your ESP32. Using a proper USB cable should solve your problem.

Finding your MicroPython .bin file

After downloading the ESP32 .bin file, it should be in your Downloads folder. So, with your Terminal window, you’ll need to navigate to the Downloads folder using the cd command:

cd Downloads

List all files in your Downloads folder to ensure that’s where the .bin file is located. In Windows, you use:

dir

On Mac OS X or Linux, run the next command:

ls

As you can see in the preceding screenshot, the ESP32 .bin file is located in the Downloads folder: esp32-20190113-v1.9.4-779-g5064df207.bin.

Erasing ESP32 Flash Memory

Before flashing the MicroPython firmware, you need to erase the ESP32 flash memory. So, with your ESP32 connected to your computer, hold-down the “BOOT/FLASH” button in your ESP32 board:

While holding down the “BOOT/FLASH” button, run the following command to erase the ESP32 flash memory:

python -m esptool --chip esp32 erase_flash

When the “Erasing” process begins, you can release the “BOOT/FLASH” button. After a few seconds, the ESP32 flash memory will be erased.

Note: if after the “Connecting …” message you keep seeing new dots appearing, it means that your ESP32 is not in flashing mode. You need to repeat all the steps described earlier and hold the “BOOT/FLASH” button again to ensure that your ESP32 goes into flashing mode and completes the erasing process successfully.

Flashing MicroPython Firmware on ESP32 with esptool.py

With your ESP32 flash memory erased, you can finally flash the MicroPython firmware. You need your serial port name (COM7 in our case) and the ESP32 .bin file location. Replace the next command with your details:

python -m esptool --chip esp32 --port <serial_port> write_flash -z 0x1000 <esp32-X.bin>

In our case, the command looks like this:

python -m esptool --chip esp32 --port COM7 write_flash -z 0x1000 esp32-20190113-v1.9.4-779-g5064df207.bin

Hold down the “BOOT/FLASH“, before running the flash command. After a few seconds this is what you should see:

Your ESP32 was successfully flashed with MicroPython firmware!

Note: if you receive an error trying to flash the firmware, run the command again and make sure you are holding down the ESP32 “BOOT/FLASH” button.

[Part 2 – ESP8266] Downloading and Flashing the MicroPython Firmware on ESP8266

To download the latest version of MicroPython firmware for the ESP32, go to the MicroPython Downloads page and scroll all the way down to the ESP8266 section.

You should see a similar web page (see figure below) with links to download .bin files. Download the latest release. At the time of writing this article, the latest release is v1.17 (2021-02-02).bin. Don’t download the Nighlty builds; those versions are not stable and are only recommended for advanced programmers.

Download MicroPython Firmware

Note: if you’re using a different board (like a PyBoard, WiPy, or other), go to MicroPython Downloads page and download the right firmware for your board.

Finding the Serial Port Name

It’s a bit different to find the Serial port name in each operating system, so for simplicity reasons we recommend finding your ESP serial port name through the Arduino IDE. Follow these steps:

  1. Connect your board to your computer
  2. Open the Arduino IDE
  3. Go to Tools > Port
  4. Save your ESP8266 serial port name (in our case it’s COM4)
  5. Close your Arduino IDE software

Important: if you plug your ESP8266 board to your computer, but you can’t find the ESP8266 Port available in your Arduino, it might be one of these two problems: 1. USB drivers missing or 2. USB cable without data wires.

1. If you don’t see your ESP’s COM port available, this often means you don’t have the USB drivers installed. Take a closer look at the chip next to the voltage regulator on board and check its name.

The ESP8266 ESP-12E NodeMCU board uses the CP2102 chip.

Go to Google and search for your specific chip to find the drivers and install them in your operating system.

You can download the CP2102 drivers on the Silicon Labs website.

After they are installed, restart the Arduino IDE and you should see the serial port in the Tools > Port menu.

2. If you have the drivers installed, but you can’t see your device, double-check that you’re using a USB cable with data wires.

USB cables from powerbanks often don’t have data wires (they are charge only). So, your computer will never establish a serial communication with your ESP8266. Using a proper USB cable should solve your problem.

Finding your MicroPython .bin file

After downloading the ESP8266 .bin file, it should be in your Downloads folder. So, with your Terminal window, you’ll need to navigate to the Downloads folder using the cd command:

cd Downloads

List all files in your Downloads folder to ensure that’s where the .bin file is located. In Windows, you use:

dir

On Mac OS X or Linux, run the next command:

ls

As you can see in the preceding screenshot, the ESP8266 .bin file is located in the Downloads folder: esp8266-20180511-v1.9.4.bin.

Erasing ESP8266 Flash Memory

Before flashing the MicroPython firmware, you need to erase the ESP8266 flash memory. So, with your ESP8266 connected to your computer, hold-down the “BOOT/FLASH” button in your ESP8266 board:

While holding down the “BOOT/FLASH” button, run the following command to erase the ESP8266 flash memory:

python -m esptool --chip esp8266 erase_flash

When the “Erasing” process begins, you can release the “BOOT/FLASH” button. After a few seconds, the ESP8266 flash memory will be erased.

Note: if after the “Connecting …” message you keep seeing new dots appearing, it means that your ESP8266 is not in flashing mode. You need to repeat all the steps described earlier and hold the “BOOT/FLASH” button again to ensure that your ESP8266 goes into flashing mode and completes the erasing process successfully.

Flashing MicroPython Firmware on ESP8266 with esptool.py

With your ESP8266 flash memory erased, you can finally flash the MicroPython firmware. You need your serial port name (COM7 in our case) and the ESP8266 .bin file location. Replace the next command with your details:

python -m esptool --chip esp8266 --port <serial_port> write_flash --flash_mode dio --flash_size detect 0x0 <esp8266-X.bin>

In our case, the final command looks like this:

python -m esptool --chip esp8266 --port COM4 write_flash --flash_mode dio --flash_size detect 0x0 esp8266-20180511-v1.9.4.bin

Hold down the “BOOT/FLASH“, before running the flash command. After a few seconds this is what you should see:

Your ESP8266 was successfully flashed with MicroPython firmware!

Note: if you receive an error trying to flash the firmware, run the command again and make sure you are holding down the ESP8266 “BOOT/FLASH” button.

Wrapping Up

We hope you’ve found this tutorial useful. Your ESP32/ESP8266 should now be flashed with MicroPython firmware. To learn more about MicroPython read: Getting Started with MicroPython on ESP32 and ESP8266.

If you liked this post, you might like our next ones, so make sure you subscribe to the RNT blog and download our free electronics eBooks.

This topic has been deleted. Only users with topic management privileges can see it.

  • I purchased an M5Stack Fire and it worked great for about twenty minutes. (using Win10 and Arduino)

    Since then I get the error; A fatal error occurred: MD5 of file does not match data in flash!

    I’ve spent an insane amount of time trying to find a fix. Do I just have broken hardware?

    Please help.


  • @pchidley Hi, Which writer do you use? M5Burner ?
    Please try the erase button once and setting Baurate 115200 bps!!


  • @pchidley then…Please try these way.

    1. Turn upside down cable connection.
    2. Change cable If you have an another cable.
    3. Remove battery bottom.

  • @pchidley Hi, Please try this command on your terminal.

    esptool --port <YOUR PORT> write_flash_status --non-volatile 0

    or

    esptool.py --port <YOUR PORT> write_flash_status --non-volatile 0

    take care this command!!!


  • @salty_good said in A fatal error occurred: MD5 of file does not match data in flash!:

    @pchidley Hi, Please try this command on your terminal.

    esptool --port <YOUR PORT> write_flash_status --non-volatile 0

    or

    esptool.py --port <YOUR PORT> write_flash_status --non-volatile 0

    take care this command!!!

    Thanks this is the way to go with my M5Stack, got it new and I was never able to make it work, this command fixed it!

    Great! Thanks


  • sorry for resurrecting this post from the dead but where exactly do you run the esptool —port <YOUR PORT> write_flash_status —non-volatile 0 command?


  • @mr-clay said in A fatal error occurred: MD5 of file does not match data in flash!:

    sorry for resurrecting this post from the dead but where exactly do you run the esptool —port <YOUR PORT> write_flash_status —non-volatile 0 command?

    You run this in a terminal or command line program.
    Replace YOUR PORT with the name of the port that appears in arduino. On windows this may be COM followed by a number on OSX this is often somelike USBslab.


  • Понравилась статья? Поделить с друзьями:
  • Esp ошибка фольксваген поло
  • Esp ошибка поло седан
  • Esp ошибка мерседес w245
  • Esp rpa ошибка фортнайт
  • Esp error tiguan