Using esptool 4.5.1 on MacOS, I get something like the following message from three different modules when I attempt to read flash:
( /opt/homebrew/bin/esptool.py --chip auto --port /dev/tty.usbserial-DU0CLKHM --baud 460800 \
read_flash 0x9000 0x6000 nvs.bin )
esptool.py v4.5.1
Serial port /dev/tty.usbserial-DU0CLKHM
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c0:49:ef:eb:9c:28
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
A fatal error occurred: Corrupt data, expected 0x1000 bytes but received 0xf6c bytes
gmake: *** [Makefile:153: nvs] Error 2
esptool read_flash fails with too-short read
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: esptool read_flash fails with too-short read
Your baud rate may be too fast. Try a slower baud rate.
Re: esptool read_flash fails with too-short read
That was the issue. Setting the baudrate to 230400 works.
The espressif documentation has this as an explicit example:
See https://docs.espressif.com/projects/esp ... read-flash.
The espressif documentation has this as an explicit example:
Code: Select all
esptool.py -p PORT -b 460800 read_flash 0 0x200000 flash_contents.bin
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: esptool read_flash fails with too-short read
Yeah, the max baud rate you can use depends on the setup (usb-serial chip, connection wires etc). On a devboard, that baudrate probably works fine, but on unknown hardware, all bets are off.
Who is online
Users browsing this forum: No registered users and 14 guests