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

高版本ESPTOOLS烧录提示MD5校验错误 (ESPTOOL-991) #1052

Open
1 task done
Exculivor opened this issue Jan 15, 2025 · 4 comments
Open
1 task done

高版本ESPTOOLS烧录提示MD5校验错误 (ESPTOOL-991) #1052

Exculivor opened this issue Jan 15, 2025 · 4 comments

Comments

@Exculivor
Copy link

Operating System

Win11

Esptool Version

v4.7.dev3

Python Version

py3.11

Chip Description

ESP32S3R8V

Device Description

ESP32S3R8V+GD25LQ256DWIGR

Hardware Configuration

SCH.pdf

How is Esptool Run

VSCODE

Full Esptool Command Line that Was Run

C:\Users\Administrator.espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:\Users\Administrator.espressif\frameworks\esp-idf-v5.1.2\components\esptool_py\esptool\esptool.py -p COM51 -b 460800 --before default_reset --after hard_reset --chip esp32s3 write_flash --flash_mode dout --flash_freq 80m --flash_size detect 0x0 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin

Esptool Output

esptool.py v4.7.dev3
Serial port COM51
Connecting...
Chip is ESP32-S3 (QFN56) (revision v0.1)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_1v8)
Crystal is 40MHz
MAC: 7c:df:a1:e4:68:c0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 32MB
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00010000 to 0x00041fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 22384 bytes to 14203...
Wrote 22384 bytes (14203 compressed) at 0x00000000 in 0.5 seconds (effective 363.7 kbit/s)...
File  md5: ea91be95071854f4b33eed1547b0a0a3
Flash md5: d0913d86e665dac358d3829b98c691e6
MD5 of 0xFF is d0913d86e665dac358d3829b98c691e6

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

 *  终端进程“C:\Users\Administrator\.espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe 'C:\Users\Administrator\.espressif\frameworks\esp-idf-v5.1.2\components\esptool_py\esptool\esptool.py', '-p', 'COM51', '-b', '460800', '--before', 'default_reset', '--after', 'hard_reset', '--chip', 'esp32s3', 'write_flash', '--flash_mode', 'dout', '--flash_freq', '80m', '--flash_size', 'detect', '0x0', 'bootloader/bootloader.bin', '0x10000', 'hello_world.bin', '0x8000', 'partition_table/partition-table.bin'”已终止,退出代码: 2。

More Information

硬件:ESP32S3R8V+GD25LQ256DWIGR
工具:flash_download_tool_3.9.7、flash_download_tool_3.9.4
IDE:VS CODE + ESP-IDF V5.1.2、esptool.py v4.7.dev3
现象:使用flash_download_tool_3.9.4可以正常烧录,使用VSCODE或者使用flash_download_tool_3.9.7下载都提示MD5校验失败。把flash_download_tool_3.9.7的spi_download.conf里面的verify = True改成False能正常下载。
ESP32下载失败图片.zip

Other Steps to Reproduce

No response

I Have Read the Troubleshooting Guide

  • I confirm I have read the troubleshooting guide.
@github-actions github-actions bot changed the title 高版本ESPTOOLS烧录提示MD5校验错误 高版本ESPTOOLS烧录提示MD5校验错误 (ESPTOOL-991) Jan 15, 2025
@dobairoland
Copy link
Collaborator

Hi @Exculivor. Could you please try to use esptool directly instead of the flash_download_tool?

Here is a guide how to set up a separate esptool installation: https://docs.espressif.com/projects/esptool/en/latest/esp32/installation.html#virtual-environment-installation. Please install the latest version of esptool, version 4.8.1. Are you experiencing the same issue with it? If yes then please share the logs after adding the --trace command line argument.

@Exculivor
Copy link
Author

log.txt

Hi, I have updated the version as you suggested, but the problem still persists. Here is the log I captured as you instructed. Please help me check where the problem lies. Thank you for your efforts!

@Exculivor
Copy link
Author

log_esptool.py v4.6.2.txt

This is the log after I downgraded ESPTOOLS to version 4.6.2.

@Exculivor
Copy link
Author

After downgrading the version of ESPTOOLS, the firmware was flashed successfully. Moreover, it has been tested and is operating normally.

This is the log when flashing the firmware with VSCode + IDF after downgrading the version:

esptool.py v4.6.2
Serial port COM51
Connecting...
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 7c:df:a1:e4:68:c0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 32MB
WARNING: Flasher stub doesn't fully support flash size larger than 16MB, in case of failure use --no-stub.
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00010000 to 0x00041fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 22352 bytes to 14185...
Wrote 22352 bytes (14185 compressed) at 0x00000000 in 0.7 seconds (effective 265.2 kbit/s)...
Hash of data verified.
Compressed 202272 bytes to 109813...
Wrote 202272 bytes (109813 compressed) at 0x00010000 in 2.8 seconds (effective 587.1 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 236.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

This is the log transmitted back from the ESP32 after it starts running.

PS E:\workspace\power\D-Watch\soft\hello_world> $env:IDF_PATH = 'C:/Users/Administrator/.espressif/frameworks/esp-idf-v5.1.2/';
PS E:\workspace\power\D-Watch\soft\hello_world>  & 'C:\Users\Administrator\.espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe' 'C:\Users\Administrator\.espressif\frameworks\esp-idf-v5.1.2\tools\idf_monitor.py' -p COM51 -b 115200 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 'e:\workspace\power\D-Watch\soft\hello_world\build\hello_world.elf'
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM51 instead...
--- esp-idf-monitor 1.3.3 on \\.\COM51 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40378446
0x40378446: esp_cpu_wait_for_intr at C:/Users/Administrator/.espressif/frameworks/esp-idf-v5.1.2/components/esp_hw_support/cpu.c:121

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x18e4
load:0x403c9700,len:0x4
load:0x403c9704,len:0xda4
load:0x403cc700,len:0x3084
SHA-256 comparison failed:
Calculated: 150cd480e737ae3e25181a2fd2a3b7946f38da43d8ee63ec0fa4bb9dff561f1f
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c9934
I (45) boot: ESP-IDF v5.1.2-dirty 2nd stage bootloader
I (45) boot: compile time Jan 17 2025 11:33:27
I (45) boot: Multicore bootloader
I (49) boot: chip revision: v0.1
I (52) qio_mode: Enabling QIO for flash chip GD
I (58) boot.esp32s3: Boot SPI Speed : 80MHz
I (62) boot.esp32s3: SPI Mode       : QIO
I (67) boot.esp32s3: SPI Flash Size : 32MB
I (72) boot: Enabling RNG early entropy source...
I (77) boot: Partition Table:
I (81) boot: ## Label            Usage          Type ST Offset   Length
I (88) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (96) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (103) boot:  2 factory          factory app      00 00 00010000 00100000
I (111) boot: End of partition table        
I (115) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=09f10h ( 40720) map    
I (128) esp_image: segment 1: paddr=00019f38 vaddr=3fc91400 size=0287ch ( 10364) load   
I (133) esp_image: segment 2: paddr=0001c7bc vaddr=40374000 size=0385ch ( 14428) load   
I (143) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=17a98h ( 96920) map    
I (159) esp_image: segment 4: paddr=00037ac0 vaddr=4037785c size=09b5ch ( 39772) load   
I (170) boot: Loaded app from partition at offset 0x10000
I (171) boot: Disabling RNG early entropy source...
I (182) cpu_start: Multicore app
I (182) cpu_start: Pro cpu up.
I (182) cpu_start: Starting app cpu, entry point is 0x40375264
0x40375264: call_start_cpu1 at C:/Users/Administrator/.espressif/frameworks/esp-idf-v5.1.2/components/esp_system/port/cpu_start.c:157

I (0) cpu_start: App cpu up.
I (200) cpu_start: Pro cpu start user code  
I (200) cpu_start: cpu freq: 160000000 Hz   
I (201) cpu_start: Application information: 
I (203) cpu_start: Project name:     hello_world
I (209) cpu_start: App version:      1      
I (213) cpu_start: Compile time:     Jan 17 2025 11:33:07
I (219) cpu_start: ELF file SHA256:  2aabbd39b7b976ef...
I (225) cpu_start: ESP-IDF:          v5.1.2-dirty
I (231) cpu_start: Min chip rev:     v0.0   
I (235) cpu_start: Max chip rev:     v0.99 
I (240) cpu_start: Chip rev:         v0.1   
I (245) heap_init: Initializing. RAM available for dynamic allocation:
I (252) heap_init: At 3FC944D8 len 00055238 (340 KiB): DRAM
I (258) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (265) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (271) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM
I (278) spi_flash: detected chip: gd        
I (282) spi_flash: flash io: qio
I (286) sleep: Configure to isolate all GPIO pins in sleep state
I (292) sleep: Enable automatic switching of GPIO sleep configuration
I (300) app_start: Starting scheduler on CPU0
I (305) app_start: Starting scheduler on CPU1
I (305) main_task: Started on CPU0
I (315) main_task: Calling app_main()
Hello world!
This is esp32s3 chip with 2 CPU core(s), WiFi/BLE, silicon revision v0.1, 32MB external flash
Minimum free heap size: 390008 bytes        
Restarting in 10 seconds...
Restarting in 9 seconds...
Restarting in 8 seconds...
Restarting in 7 seconds...
Restarting in 6 seconds...
None
Waiting for the device to reconnect...............................................................................................

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants