如何修复 ESP32 A fatal error occurred: ESP32 ROM does not support function erase_flash
问题:
运行 esptool erase_flash 时,你看到类似这样的错误消息:
esptool_erase_flash_error.txt
esptool.py v2.8
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
WARNING: Detected crystal freq 41.01MHz is quite different to normalized freq 40MHz. Unsupported crystal in use?
Crystal is 40MHz
MAC: 7c:9e:bd:f4:60:e0
Enabling default SPI flash mode...
Erasing flash (this may take a while)...
A fatal error occurred: ESP32 ROM does not support function erase_flash.解决方案
你可能正在使用**过时版本的 esptool。**使用 GitHub 上的 esptool:
clone_esptool.sh
git clone https://github.com/espressif/esptool.git然后使用以下命令运行它
erase_flash.sh
cd esptool
python3 esptool.py erase_flashCheck out similar posts by category:
Electronics, ESP8266/ESP32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow