-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
write_flash --erase-all option corrupting flash (ESPTOOL-562) #805
Comments
Hello @git-n-pissed, I can confirm the I will fix this and add tests so this never goes under the radar again. In the meantime, I advise everyone to run the |
Was the behavior of the |
It's actually more complicated, but the The fix is in the works - you can try and verify it. Just add this code under this ...
except (FatalError, struct.error, RuntimeError):
continue
finally: # add this
argfile.seek(0) # add this
if image.chip_id != esp.IMAGE_CHIP_ID:
... |
Operating System
Windows 10, WSL 1.0 (Ubuntu 22.04.1 LTS)
Esptool Version
4.4
Python Version
3.10.6
Chip Description
ESP32-S3-WROOM
Device Description
ESP32-S3-DevKitC-1
Hardware Configuration
No response
How is Esptool Run
bash
Full Esptool Command Line that Was Run
python3 -m esptool --baud 921600 --chip esp32s3 --port /dev/ttyS9 write_flash --erase-all --verify 0 /mnt/c/Users/git-n-pissed/Desktop/GENERIC_S3-20220618-v1.19.1.bin
Esptool Output
More Information
esptool v2.6, the
write_flash --erase-all
option worked as expected, erasing the flash before writing, all in one command. I just upgraded to esptool v4.4 and this option now causes the flash to be corrupted on write without any indication of failure until you REPL in. What's worse, if you also use the--verify
option, you are told the--verify
option is deprecated and that flash contents are always read back after flashing, but verification goes ahead anyway, and eventually fails. I'm seeing the same behavior on ESP8266, ESP32-WROOM32, and ESP32-S3-WROOM32, using various USB chips (FT232RQ, CH340, CP2102W) all using a stock downloaded build of MicroPython (v1.19.1).Other Steps to Reproduce
No response
I Have Read the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: