These are chat archives for esp8266/Arduino

7th
Mar 2017
Charles
@hallard
Mar 07 2017 14:03
Hi guys, I have a question about OTA, with arduino-esp8266 seems we're locked at max sketch size to 512KB (because the 512KB remaining are reserved for OTA update), but it seems with espressif SDK, using FOTA with device with at least 2MB we can have a sketch with 1MB size, in case of FTOA new sketch will be uploaded from 1M to 2M area and then run from this, is this correct ?
Martin Sloup
@arcao
Mar 07 2017 14:06
Sketch binary size is limited to 1MB, so you need at least 2MB flash memory.
Charles
@hallard
Mar 07 2017 14:07
yeah, got it, but if I've got 4MB and using arduino OTA (not espressiff FOTA) would I be able to use OTA with sketch of 768K for example ?
thanks Martin, I already read all documentation
but size and limit are not indicated ;-)
if I choose 1M + 1M SPIFFS with a 4M chip, would I be able to use, 1M for sketch, 1M for OTA and then 1M for SPIFFS ?
Martin Sloup
@arcao
Mar 07 2017 14:10
You need to change partition layout, In Arduino IDE it's in Tools->Flash Size.
You need to change it to: 4MB (1 MB spiffs)
so 1MB spiffs + 3 MB other (app + ota)
Charles
@hallard
Mar 07 2017 14:12
thanks that's what I needed to know so in this case I can have 1M sketch size, use OTA, and have 1M SPIFFS (leaving 1M not used)
Martin Sloup
@arcao
Mar 07 2017 14:13
Yes, exactly.
Charles
@hallard
Mar 07 2017 14:13
interesting, may be remapping SPIFFS we could have 2M 2M SPIFFS to get all size ;-)
first 2M for sketch+OTA and 2M SPIFFS
thanks Martin, I though we was limited to 1M for sketch + OTA, you saved my day ;-)
Martin Sloup
@arcao
Mar 07 2017 14:44
technically, it's possible to change partition table. You need define a new eagle.flash.xxx.ld in tools\sdk\ld\ and add it to boards.txt.
Charles
@hallard
Mar 07 2017 14:54
Correct
for those interested, just tested and checked what Martin said
blob
works like a charm
810KB flash firmware works with Arduino OTA
mapping 4MB/1MB SPIFFS of course
Mehrdad K
@mkeyno
Mar 07 2017 21:43
@arcao I just curious why flash size setting not define for 4M(2M,2M)?
Martin Sloup
@arcao
Mar 07 2017 21:53
Don't ask me. Create a new issue / push request with fix.
:)
Mehrdad K
@mkeyno
Mar 07 2017 22:17
I thought its technical issue, because I saw 2M left away for 2M(1M,1M) setting with no reason , but I think its just matter of SPIFF new boundary definition