一、准备工作
需要用到esptool
工具;
GitHub仓库地址:https://github.com/themadinventor/esptool
安装方法:
推荐使用pip安装,打开命令窗口,输入以下指令:
- 安装esptool
pip install esptool
- esptool需要使用串口,安装pyserial
pip install pyserial
查看帮助:
esptool.py -h
查看某个指令用法:
esptool.py read_flash -h
二、解决方法
- 目标板进入烧录模式
- 连接好目标芯片,打开esptool工具,输入以下指令:
- Windows:
esptool.py --port <对应端口号> write_flash_status --non-volatile 0
- Linux:
sudo ./esptool.py -p /dev/ttyUSB* write_flash_status --non-volatile 0
出现以下Log即表示成功:
esptool.py v2.4.0
Connecting........_
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: b4:e6:2d:68:3b:96
Uploading stub...
Running stub...
Stub running...
Initial flash status: 0x0200
Setting flash status: 0x0000
After flash status: 0x0000
Hard resetting via RTS pin...
- 重新刷入自己的程序
参考链接:
- https://www.cnblogs.com/dylancao/p/12612568.html
- https://blog.csdn.net/z755924843/article/details/82704020