esp8266重新烧录固件会自动替代原来的固件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了esp8266重新烧录固件会自动替代原来的固件相关的知识,希望对你有一定的参考价值。

参考技术A 会。
是替换关系,新的固件会替换原来的固件,对硬件进行优化。而且也操作简单。
烧录固件需要将开发版烧录刷入正确的固件,就好比给电脑安装操作系统。

ESP32在Thonny 环境下 MicroPython固件烧录以及开发使用

ESP32在Thonny 环境下 MicroPython固件烧录以及开发使用


Thonny软件安装

MicroPython的开发工具很多,简单易上手个人推荐使用Thonny

  • Thonny:https://thonny.org/

ESP32 固件下载和烧录

固件可以从MicroPython官网进行下载,ESP32的固件目前分为两类,分别基于ESP-IDF v3.xESP-IDF v4.x开发,目前支持的功能上稍有差异。每一类又细分为 GENERIC 普通的 和 GENERIC-SPIRAM 支持外部SPI RAM的.

  • https://micropython.org/download/esp32/

这里以下载最新的固件为例:V1.19.1

  • 如果是ESP32C3的开发板或主控的,Micro Python固件下载地址

https://www.micropython.org/download/esp32c3/

固件烧录

  • 烧录信息
"C:\\Program Files (x86)\\Thonny\\python.exe" -u -m esptool --port COM22 erase_flash
esptool.py v3.1
Serial port COM22
Connecting.....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 08:3a:f2:8d:cd:e0
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 38.6s
Hard resetting via RTS pin...
Erasing done
------------------------------------

"C:\\Program Files (x86)\\Thonny\\python.exe" -u -m esptool --port COM22 write_flash --flash_mode dio --flash_size detect 0x1000 C:/Users/Administrator/Downloads/esp32-20220618-v1.19.1.bin
esptool.py v3.1
Serial port COM22
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 08:3a:f2:8d:cd:e0
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00001000 to 0x0017efff...
Flash params set to 0x0240
Compressed 1560976 bytes to 1029132...
Writing at 0x00001000... (1 %)
Writing at 0x000116f2... (3 %)
Writing at 0x00019ef8... (4 %)
Writing at 0x000221b5... (6 %)
Writing at 0x00028b0e... (7 %)
Writing at 0x00032087... (9 %)
Writing at 0x0003c411... (11 %)
Writing at 0x00046469... (12 %)
Writing at 0x0004f18f... (14 %)
Writing at 0x0005498d... (15 %)
Writing at 0x000599ff... (17 %)
Writing at 0x0005ec7c... (19 %)
Writing at 0x00063c6d... (20 %)
Writing at 0x00068dfe... (22 %)
Writing at 0x0006de91... (23 %)
Writing at 0x00072ad9... (25 %)
Writing at 0x0007779a... (26 %)
Writing at 0x0007ddd9... (28 %)
Writing at 0x000837c0... (30 %)
Writing at 0x00089045... (31 %)
Writing at 0x0008debf... (33 %)
Writing at 0x000941ab... (34 %)
Writing at 0x0009959e... (36 %)
Writing at 0x0009eb23... (38 %)
Writing at 0x000a4813... (39 %)
Writing at 0x000aa571... (41 %)
Writing at 0x000b09de... (42 %)
Writing at 0x000b5e76... (44 %)
Writing at 0x000bb373... (46 %)
Writing at 0x000c172a... (47 %)
Writing at 0x000c6a90... (49 %)
Writing at 0x000cbd87... (50 %)
Writing at 0x000d11ef... (52 %)
Writing at 0x000d6223... (53 %)
Writing at 0x000db08a... (55 %)
Writing at 0x000e07f2... (57 %)
Writing at 0x000e5cf8... (58 %)
Writing at 0x000eb7d4... (60 %)
Writing at 0x000f1251... (61 %)
Writing at 0x000f616a... (63 %)
Writing at 0x000fb21f... (65 %)
Writing at 0x00100872... (66 %)
Writing at 0x00105cf7... (68 %)
Writing at 0x0010ad4d... (69 %)
Writing at 0x00110506... (71 %)
Writing at 0x001156c1... (73 %)
Writing at 0x0011a9f0... (74 %)
Writing at 0x0011fe6d... (76 %)
Writing at 0x00125474... (77 %)
Writing at 0x0012a93b... (79 %)
Writing at 0x001300eb... (80 %)
Writing at 0x001356ef... (82 %)
Writing at 0x0013b215... (84 %)
Writing at 0x00140cd6... (85 %)
Writing at 0x0014640a... (87 %)
Writing at 0x0014bc65... (88 %)
Writing at 0x001519f9... (90 %)
Writing at 0x0015ade6... (92 %)
Writing at 0x0016266b... (93 %)
Writing at 0x00168329... (95 %)
Writing at 0x0016ddf2... (96 %)
Writing at 0x0017358d... (98 %)
Writing at 0x001789e4... (100 %)
Wrote 1560976 bytes (1029132 compressed) at 0x00001000 in 91.7 seconds (effective 136.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Done!

  • 烧录完后重新,shell窗口看到的打印信息

接下来就可以进入到Micro Python环境下开发和调试ESP32开发板了。

以上是关于esp8266重新烧录固件会自动替代原来的固件的主要内容,如果未能解决你的问题,请参考以下文章

ESP8266烧录固件接线方法,配置掉电无法保存

关于esp8266烧写固件后下载Lua代码一直超时的原因

ESP8266-01烧录神器,ESP8266-01S烧录程序 ESP-01烧录固件

ESP8266-12F烧录V1.7以上版本AT固件的方法

MicroPython esp8266固件烧写教程

安信可esp8266怎么烧写固件库