Closed
Description
Platform
- Hardware: [ESP-WROOM-02](it is based on esp8266 with 2MB flash size)
- Core Version: [latest git hash or date]
- Development Env: [Arduino IDE]
- Operating System: [Windows]
Settings in IDE
- Module: [Generic ESP8266 Module]
- Flash Mode: [dio]
- Flash Size: [2MB]
- lwip Variant: [v2 Lower Memory]
- Reset Method: [ck]
- Flash Frequency: [40Mhz]
- CPU Frequency: [80Mhz]
- Upload Using: [SERIAL]
- Upload Speed: [115200] (serial upload only)
Problem Description
I receive HTTP_UPDATE_FAILED Error (-100): Not Enough space
while updating firmware with ESP8266httpUpdate (HTTP OTA)
My sketch has 549965 bytes (more, then 512K), but ESP.getFlashChipRealSize() gives me 2097152
In ESP8266httpUpdate I found this
if(len > (int) ESP.getFreeSketchSpace()) {
DEBUG_HTTP_UPDATE("[httpUpdate] FreeSketchSpace to low (%d) needed: %d\n", ESP.getFreeSketchSpace(), len);
startUpdate = false;
}
Maximum sketch size can be 1044464.
Am i rigth that if i have sketch more, then half of 1044464 i can not update it with ESP8266httpUpdate, despite that flash size is 2097152?
What can be done, to overcome this limitation?