esp8266-12f设置micropython

NO.1
下载驱动

参考资料

https://blog.csdn.net/weixin_30325929/article/details/113070303 

本文使用为CH340驱动

NO.2
查看端口

进入设备管理器,此处为COM5

NO.3
下载固件

官网地址

https://micropython.org/download/esp8266/ 

选中一个稳定版本bin文件下载

 

NO.4
安装python

安装esptool模块 

pip install esptool
NO.5
擦除固件

以下代码

esptool -p COM5 erase_flash

操作结果

(dh11) F:\dsx2016\microPy\dh11>esptool -p COM5 erase_flash
esptool.py v3.1
Serial port COM5
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: c4:5b:be:4c:b5:be
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 13.6s
Hard resetting via RTS pin...

Chip erase completed successfully in 13.6s 代表擦除成功

NO.6
刷固件

以下代码

esp8266-1m-20200415-v1.12-371-gf534b9976.bin为之前下载的固件文件,按实际文件位置输入即可

esptool --p COM5 --baud 115200 write_flash --flash_size=detect 0 esp8266-1m-20200415-v1.12-371-gf534b9976.bin

 写入过程

(dh11) F:\dsx2016\microPy\dh11>esptool --p COM5 --baud 115200 write_flash --flash_size=detect 0 ./esp8266-20210902-v1.17.bin
esptool.py v3.1
Serial port COM5
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: c4:5b:be:4c:b5:be
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00000000 to 0x0009afff...
Flash params set to 0x0040
Compressed 633688 bytes to 416262...
Wrote 633688 bytes (416262 compressed) at 0x00000000 in 37.4 seconds (effective 135.6 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...

 写入成功后重启usb

NO.7
测试连接

下载putty

参考地址

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html 

设置putty

继续设置

然后点击open

弹出命令行说明成功了

输入help()

表示micropython已成功运行

参考连接

http://www.taichi-maker.com/homepage/esp8266-nodemcu-iot/iot-micropython/micropython-nodemcu-firmware/

END