打印
[移动开发/NodeMCU]

ESP8266 nodemcu升级到最新版中的问题解决方法

[复制链接]
3389|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主

nodemcu目前最新版已经到1.5.4.1了,而官方提供的最新的bin下载是0.9.6,之后的不提供编译下载,需要使用在线的编译器选择性的编译bin。
而从0.9.6按照之前从0.9.5升级的方式后发现不可以用了,从0.9.6升级烧录了最新的1.5.4后,重启蓝色天线指示灯不停闪烁,串口不停输出乱码。
那么怎么解决呢?
首先我的是ESP-12E 配置为4M内存
方式如下:
先去
下载最新的 SDK patch (<-或者点这里),然后解压出esp_init_data_default.bin文件
准备好在线编译好的bin文件,在线编译的地址是http://nodemcu-build.com/index.php
1,首先根据你的esp8266容量选择闪存大小,其他配置如下。我的是4M,所以选择4M

强烈注意
选择 esp_init_data_default.bin 地址是根据你的闪存大小来选择的。
如果你的ESP8266为ESP-01, -03, -07等以及 拥有512 kByte闪存大小的其他系列则设置的内存地址为 0x7c000.
如果是 ESP-12E 则拥有4 MByte 闪存.设置内置写入地址为 0x3fc000 .


有4 MByte 闪存.设置内置写入地址为 0x3fc000 .
说明,该软件为nodemcu-flasher,下载地址为https://github.com/nodemcu/nodemcu-flasher
或点击此处  32位    64位

2,把在线编译的文件选中,内存地址为0x00000
下载好的 SDK patch ,然后解压出esp_init_data_default.bin 我这里用的SDK patch 1.5.4.1
内存地址设置为0x3FC000
切记这个内存地址设置错误将会导致失败,失败后就是蓝色LED不停的闪烁,串口不停的输出乱码。。。。
3,最后一步就是选中你的串口,让芯片进入待升级模式,然后按下下面的Flash(F)按键,等待两分钟完成烧录。。。之后上电,重启,搞定。。。
搞定了之后,重启,在115200波特率工作。
————————————————————————————————————————
下面引用原文来说明:
Upgrading Firmware
Important

It goes without saying that you shouldn't expect your NodeMCU 0.9.x Lua scripts to work error-free on a more recent firmware. Most notably Espressif changed the socket:send operation to be asynchronous i.e. non-blocking. See API documentation for details.

Espressif changes the init data block (esp_init_data_default.bin) for their devices along the way with the SDK. So things break when a NodeMCU firmware with a certain SDK is flashed to a module which contains init data from a different SDK. Hence, this section applies to upgrading NodeMCU firmware just as well as downgrading firmware.

A typical case that often fails is when a module is upgraded from a 0.9.x firmware to a recent version. It might look like the new firmware is broken, but the reason for the missing Lua prompt is related to the big jump in SDK versions.

If there is no init data block found during SDK startup, the SDK will install one itself. If there is a previous (potentially too old) init block, the SDK probably doesn't do anything with it but there is no documentation from Espressif on this topic.

Hence, there are two strategies to update the SDK init data:

  • Erase flash completely. This will also erase the (Lua) files you uploaded to the device! The SDK will install the init data block during startup.
  • Don't erase the flash but replace just the init data with a new file during the flashing procedure. For this you would download SDK patch 1.5.4.1 and extract esp_init_data_default.bin from there.

When flashing a new firmware (particularly with a much different size), the flash filesystem may be reformatted as the firmware starts. If it is not automatically reformatted, then it should be valid and have the same contents as before the flash operation. You can still run file.format() to re-format your flash filesystem. You will know if you need to do this if your flash files exist but seem empty, or if data cannot be written to new files. However, this should be an exceptional case.


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.



相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

认证:西安公路研究院南京院
简介:主要工作从事监控网络与通信网络设计,以及从事基于嵌入式的通信与控制设备研发。擅长单片机嵌入式系统物联网设备开发,音频功放电路开发。

1896

主题

15631

帖子

198

粉丝