OTA with 1mbyte

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

OTA with 1mbyte

#1 Post by cherowley » 13 Feb 2016, 20:23

Hi!

Just wanted to check something.

If i'm updating over the air onto a device with 1mbyte flash, I take it I should use 1meg with 512k spiffs when compiling?

Also, why does it lose all its settings? Is it because the temp new image overwrites the setting on the chip?

I mean, there isn't enough room for live image + temp new image + settings?

Cheers!

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

Re: OTA with 1mbyte

#2 Post by cherowley » 16 Feb 2016, 11:36

Any devs / experts can confirm my thinking on this? :)

Martinus

Re: OTA with 1mbyte

#3 Post by Martinus » 16 Feb 2016, 12:02

cherowley wrote:Any devs / experts can confirm my thinking on this? :)
The only supported choice here is 1 MB with 64kB SPIFFS.
spiffs size should be as small as possible, but not smaller than 64k.

BobS
Normal user
Posts: 15
Joined: 18 Jan 2016, 21:29

Re: OTA with 1mbyte

#4 Post by BobS » 16 Feb 2016, 12:05

1mb with 512k spiffs won't work there is only 512k left for both old and new image.
You must select a smaller spiffs size to make it work.

cherowley
Normal user
Posts: 125
Joined: 14 Jan 2016, 09:39

[SOLVED] Re: OTA with 1mbyte

#5 Post by cherowley » 16 Feb 2016, 12:10

Thanks for swift replies guys and also in the other thread..

costo
Normal user
Posts: 490
Joined: 21 Nov 2015, 15:03

Re: OTA with 1mbyte

#6 Post by costo » 17 Feb 2016, 00:12

Thanks to the info supplied by Martinus I succeeded in flashing back and forth between ESPEasy_R78_1024.bin and my own created bin file of the fork from github https://github.com/costonisp/MiniESPEasy. For easyness I had recreated R78_1204.bin and my own binfile both with the SSID and PASSWORD into the sourcecode.
At first created my own file with 64kSPIFFS and the flashing did go well but it was not 100% flawless, sometimes i waited and waited and had to do a cold boot and try again, then it usually went well.
Compiling with SSID and PassWord makes ESPEasy connect to the network immediately at bootup and not as AP.

After looking into the theory of FlashingOverTheAir i made the calculation.

Boot program: 4K
Application: 374K
leaving 512-(374+4) = 134K for SPI FlashFileSystem, looks like 128K SPIFFS is possible.

So I generated my own 1024k.bin with the compile setting 128K SPIFFS and did the FOTA into the R78_1024.bin (compiled with 64kSPIFFS), That worked too with one small difference, The ESP came back in AP_mode on 192.168.4.1 . Apparently the different SPIFFS setting had ruined the part where the ssid and password are stored. After configuring the network everything worked fine, making it possible to do FOTA back again.

So everything workes exactly as Martinus had predicted :)

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests