Chat freely about anything...

User avatar
By lucasromeiro
#74046 Hello, I am using in a project with new OTA update function. (12E module)
But I still do not know what the limitations are and what the requirements are.
I researched a little, but I still have many doubts.
The best I found was this:
http://arduino-esp8266.readthedocs.io/e ... eadme.html

But still not clear enough.
In this link it says that in memory should have enough space for the old program and the new program. so I can only use up to 50% of my storage space for programs? The maximum is 1044464 bytes. (Arduino show)

500k of SPIFFS is enough to save the data of my application.

I take it to take another question that relates to this:
I use the arduino compiler and it gives me the option of:
Flash size "4M (1M SPIFFS)"
Flash size "4M (3M SPIFFS)"

What's the difference between them? I did not observe change when I changed.
User avatar
By btidey
#74050 The maximum running program size is 1MB

The difference between 1 and 3M SPIFFS is the amount allocated to SPIFFS. 3M maximises SPIFFS space leaving 1MB total for program.

OTA does need twice the amount of program space so it can hold the new copy as well as the old before finally committing the new. So with 3MB SPIFFS set ups the maximum compiled size is 0.5MB which is normally OK. 1MB SPIFFS allows up to 1MB sketches to be OTA'd (1M+1M program, 1M SPIFFS, 1M unusable).

There is a new memory scheme not currently released in the Arduino set up called 2MB/2MB SPIFFS. This allocates 2MB to Program space and 2MB to SPIFFS. Although the maximum run time size is still 1MB, it does allow for 1MB programs to be OTA'd while leaving 2MB for SPIFFS. This scheme can be patched in fairly simply. See https://github.com/esp8266/Arduino/issues/3226