Open
Description
Basic Infos
- [x ] This issue complies with the issue POLICY doc.
- [x ] I have read the documentation at readthedocs and the issue is not addressed there.
- [x ] I have tested that the issue is present in current master branch (aka latest git).
- [x ] I have searched the issue tracker for a similar issue.
- [x ] If there is a stack dump, I have decoded it.
- [x ] I have filled out all fields below.
Platform
- Hardware: [ESP8285H16 - 2M ]
- Core Version: [3.1.2]
- Development Env: [Arduino IDE]
- Operating System: [Windows 10]
Settings in IDE
- Module: [Generic ESP8285 Module]
- Flash Mode: [dout]
- Flash Size: [2MB(FS:64KB OTA:~992KB)]
- lwip Variant: [v2 Lower Memory]
- Reset Method: [dtr|nodemcu]
- Flash Frequency: [40Mhz]
- CPU Frequency: [80Mhz|160MHz]
- Upload Using: [SERIAL]
- Upload Speed: [115200] (serial upload only)
Problem Description
I have been using the esp8285 in a commercial project for a few years now and have always updated the firmware OTA. However, after flashing the esp8285 with firmware in board version 3.1.2, it is no longer possible to update the firmware over OTA. The error below occurs:
User exception (panic/abort/assert)
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Unhandled C++ exception: OOM
>>>stack>>>
ctx: cont
sp: 3ffffc90 end: 3fffffd0 offset: 0010
3ffffca0: 3ffe9540 4020c3d4 00000010 4022883c
3ffffcb0: 3fff0704 4010bd94 3ffffd20 4020c380
.... etc
last failed alloc call: 4020CF84(16)
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
last failed alloc caller: 0x4020cf84
If you downgrade to version 3.1.0 and earlier, this error does not happen, and the firmware update via OTA proceeds normally.
There are hundreds of devices installed with board version 3.1.2 and now I can't update them over OTA anymore. Please help me to resolve. What to do?
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <ESP8266httpUpdate.h>
void FirmwareUpdate(String URL_fw_Bin)
{
#if(DEBUG_PRINT==1)
Serial.println("New firmware detected");
#endif
WiFiClient client;
BearSSL::WiFiClientSecure UpdateClient;
UpdateClient.setInsecure();
ESPhttpUpdate.setLedPin(LED_STATUS, LOW);
#if(DEBUG_PRINT==1)
Serial.print("firmware");
Serial.println(URL_fw_Bin);
#endif
t_httpUpdate_return ret = ESPhttpUpdate.update(UpdateClient,URL_fw_Bin);
#if(DEBUG_PRINT==1)
switch (ret) {
case HTTP_UPDATE_FAILED:
Serial.printf("HTTP_UPDATE_FAILED Error (%d): %s\n", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
break;
case HTTP_UPDATE_NO_UPDATES:
Serial.println("HTTP_UPDATE_NO_UPDATES");
break;
case HTTP_UPDATE_OK:
Serial.println("HTTP_UPDATE_OK");
break;
}
#endif
}
Metadata
Metadata
Assignees
Labels
No labels