-
Notifications
You must be signed in to change notification settings - Fork 13.3k
HTTP OTA with sketch size more than 512K #4941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Maybe your flash got corrupted. Try wiping your flash. |
You need to set more than your "Maximum skecth size 1044464" because of http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html especially: |
@sukretniy I don't understand your issue. First you say that you tried to update with a sketch that is 549965 in size and it failed, than you ask whether the 1M limitation can be overcome. That doesn't make sense, please clarify. The maximum sketch size is a bit less than half of your flash size. If you flash size is 2MB, then your max sketch size is slightly less than 1MB. |
I'll try to clarify
if(len > (int) ESP.getFreeSketchSpace()) {
DEBUG_HTTP_UPDATE("[httpUpdate] FreeSketchSpace to low (%d) needed: %d\n", ESP.getFreeSketchSpace(), len);
startUpdate = false;
} Len here is size of new firmware = 549965 and ESP.getFreeSketchSpace() = 491520. I have to mention, that if new firmware size less, than ESP.getFreeSketchSpace() everything goes fine. My sketch size dramatically increased after i start using this library |
Ok, I got it #4252 |
@sukretniy a quick look into that azure lib tells me that Not much can be done there, but I thought I'd mention it. About SPIFFS, the fact that you don't call SPIFFS.begin() makes no difference. The space for the filesystem is set aside in the flash mapping depending on whatever SPIFFS is selected in the IDE menu. In your case, you have a 1MB SPIFFS on a 2MB flash, so that leaves only about 1MB for both sketch and OTA, hence about 512KB max sketch size. What you would need is a smaller SPIFFS, or maybe a non-SPIFFS setup. |
Nothing can further be done for this issue. Two-steps OTA may help, or #905. |
Platform
Settings in IDE
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
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?
The text was updated successfully, but these errors were encountered: