NodeMCU文档中文翻译 4 烧写固件
一、译文
1、esptool
esptool.py --port <USB-port-with-ESP8266> write_flash -fm <mode> -fs <size> 0x00000 <nodemcu-firmware>.bin
(PS:笔者用的是nodemcu_flasher,所以对esptool的mode和size参数不甚了解)
2、NodeMCU Flasher
一个NodeMCU固件烧写工具。我们正在开发下一个版本并且将使用QT框架。它将支持跨平台和开源。
3、将烧写模块放入设备
为了能够支持ESP8266固件烧写,在设备复位前GPIO0引脚电平必须下拉。相反,正常启动GPIO0引脚电平必须上拉或浮空。
4、烧写哪些文件
- bin/0x00000.bin 文件烧写到地址 0x00000
- bin/0x10000.bin 文件烧写到地址 0x10000
(PS:下面的资料用得较少在此不作翻译,有需要的朋友可参阅原文)
二、原文
Adafruit provides a really nice firmware flashing tutorial. Below you'll find just the basics for the two popular tools esptool and NodeMCU Flasher.
Note:
Keep in mind that the ESP8266 needs to be put into flash modebefore you can flash a new firmware!
esptool
A cute Python utility to communicate with the ROM bootloader in Espressif ESP8266. It is intended to be a simple, platform independent, open source replacement for XTCOM.
Source: https://github.com/themadinventor/esptool
Supported platforms: OS X, Linux, Windows, anything that runs Python
Running esptool.py
Run the following command to flash an aggregated binary as is produced for example by the cloud build service or the Docker image.
esptool.py --port <USB-port-with-ESP8266> write_flash -fm <mode> -fs <size> 0x00000 <nodemcu-firmware>.bin
mode
isqio
for 512 kByte modules anddio
for 4 MByte modules (qio
might work as well, YMMV).size
is given in bits. Specify4m
for 512 kByte and32m
for 4 MByte.
Check the esptool flash modes documentation for details and other options.
NodeMCU Flasher
A firmware Flash tool for NodeMCU...We are working on next version and will use QT framework. It will be cross platform and open-source.
Source: https://github.com/nodemcu/nodemcu-flasher
Supported platforms: Windows
Putting Device Into Flash Mode
To enable ESP8266 firmware flashing GPIO0 pin must be pulled low before the device is reset. Conversely, for a normal boot, GPIO0 must be pulled high or floating.
If you have a NodeMCU dev kit then you don't need to do anything, as the USB connection can pull GPIO0 low by asserting DTR and reset your board by asserting RTS.
If you have an ESP-01 or other device without built-in USB, you will need to enable flashing yourself by pulling GPIO0 low or pressing a "flash" switch.
Which Files To Flash
If you build your firmware with the cloud builder or the Docker image, or any other method that produces a combined binary, then you can flash that file directly to address 0x00000.
Otherwise, if you built your own firmware from source code:
bin/0x00000.bin
to 0x00000bin/0x10000.bin
to 0x10000
Also, in some special circumstances, you may need to flash blank.bin
or esp_init_data_default.bin
to various addresses on the flash (depending on flash size and type), see below.
If upgrading from SPIFFS version 0.3.2 to 0.3.3 or later, or after flashing any new firmware (particularly one with a much different size), you may need to run file.format()
to re-format your flash filesystem. You will know if you need to do this if your flash files disappeared, or if they exist but seem empty, or if data cannot be written to new files.
Upgrading from SDK 0.9.x Firmware
If you flash a recent NodeMCU firmware for the first time, it's advisable that you get all accompanying files right. A typical case that often fails is when a module is upgraded from a 0.9.x firmware to the latest version built from the NodeMCU build service. It might look like the brand new firmware is broken, but the reason for the missing Lua prompt is related to the big jump in SDK versions: Espressif changed the esp_init_data_default.bin
for their devices along the way with the SDK 1.4.0 release. So things break when a NodeMCU firmware with SDK 1.4.0 or above is flashed to a module which contains old init data from a previous SDK.
Download a recent SDK release, e.g. esp_iot_sdk_v1.4.0_15_09_18.zipor later and extract esp_init_data_default.bin
from there. Use this file together with the new firmware during flashing.
esptool
For esptool you specify another file to download at the command line.
esptool.py write_flash <flash options> 0x00000 <nodemcu-firmware>.bin 0x7c000 esp_init_data_default.bin
Note:
The address for esp_init_data_default.bin
depends on the size of your module's flash. ESP-01, -03, -07 etc. with 512 kByte flash require 0x7c000
. Init data goes to 0x3fc000
on an ESP-12E with 4 MByte flash.
NodeMCU Flasher
The NodeMCU Flasher will download init data using a special path:
INTERNAL://DEFAULT
Replace the provided (old) esp_init_data_default.bin
with the one extracted above and use the flasher like you're used to.
References
- 2A-ESP8266IOT_SDK_User_ManualEN_v1.5.pdf, Chapter 6
- SPI Flash ROM Layout (without OTA upgrades)
NodeMCU文档中文翻译 4 烧写固件相关推荐
- NodeMCU文档中文翻译 5 上传代码
一.译文 与烧写一样,这里有好几种方法来从计算机上传代码到设备当中. 注意NodeMCU串口接口在启动时使用115200波特率,为了在启动后改变速率,可以使用uart.setup(0,9600,8,0 ...
- NodeMCU文档中文翻译 7 DHT温湿度传感器模块
[转载请注明出处:http://blog.csdn.net/leytton/article/details/76178661] 一.序言 DHT11 温湿度模块传感器 资料下载:http://pan. ...
- Pushy入门文档中文翻译
本文为博主原创,允许转载,但请声明原文地址:http://www.coselding.cn/article/2016/12/01/Pushy入门文档中文翻译/ pushy 这是我自己的翻译版本,原文地 ...
- ReactiveX文档中文翻译
ReactiveX/RxJava文档中文版 项目地址:https://github.com/mcxiaoke/RxDocs,欢迎Star和帮忙改进. 有任何意见或建议,到这里提出 Create New ...
- Word文档中文翻译成英文的方法
将Word文档在线翻译,有的时候我们在一些文档中放一些重要的内容,将这些内容放在文档中,然后通过在浏览器上进行搜索进入到在线翻译中,下面就让小编给大家简单介绍一下. 步骤一:首先我们需要在浏览器上进行 ...
- Next.js v4.1.4 文档中文翻译
最近想稍稍看下 React的 SSR框架 Next.js,因为不想看二手资料, 所以自己跑到 Github上看,Next.js的文档是英文的,看倒是大概也能看得懂, 但有些地方不太确定,而且英文看着毕 ...
- RFC文档(中文翻译版本)
RFC文档官方在线阅读地址:https://tools.ietf.org/rfc/index 以下是部分中文翻译的文档连接 RFC文档目录 RFC1 主机软件 RFC2 主机软件 RFC3 文档规范 ...
- axios 文档中文翻译
axios中文文档(完全中文翻译) 由于使用网上一些翻译文档时发现,内容多被广告隔离成小块.用起来有点不方便同时夹杂部分英文.于是索性把 axios 自己翻译了一遍,贡献给大家便查. 原文档地址-- ...
- Surround360 README文档——中文翻译
该文档位于Surround360项目根目录下 翻译正文: #Surround360 系统 Surround360是用于捕获和渲染3D(立体声)360视频和照片的硬件和软件系统,适合在VR中浏览.我们将 ...
最新文章
- C语言生成一个随机的九行九列数独,一个随机生成数独的C++程序
- Spark Streaming Backpressure分析
- 1.11 实例:字符串替换
- Qt (5.10.0)for android
- AI当下要破局,不能没有知识图谱!
- 【jQuery笔记】新浪微博案例笔记
- HTML特殊字符显示
- 剑指offer——面试题38:数字在排序数组中出现的次数
- python入门之排序,文件操作
- MATLAB显示中文乱码问题 MATLAB2016
- activiti7(三):Activiti7简介与HelloWorld
- T9 PDF如何转存为高清图片
- WIN10在服务器上找不到共享打印机,win10搜索不到共享打印机怎么办
- java多种货币的相互转换_使用java将不同的国家货币转换为双倍
- selenium 中 get_attribute 的几种用法
- 关于 android 平台上的 usb 投屏
- python搭建邮件服务器_手把手教你使用Python轻松搞定发邮件
- VM 将宿主机文件夹 映射至 虚拟机以及vm tools【共享文件夹、复制粘贴、拖动上传下载】
- 王茂斋拳架_王茂斋太极功(接近传奇,从读懂原著开始;吴式太极拳北派宗师王茂斋,门人杨禹廷、刘晚苍、王培生等名家辈出;《太极功源流支派论》《三十二目》)...
- 大数据学习之路-Hadoop