-->
Page 1 of 2

Which Flash size do i select?

PostPosted: Wed Feb 06, 2019 10:33 pm
by ac21
In the arduino IDE all my projects so far ive set my flash size to 1M(no spiffs). Haven't had a problem yet.

But i believe this requires the use of spliffs?
https://github.com/CurlyWurly-1/ESP8266 ... anager.ino

the esp i have is:
https://www.acquris.se/measurement/prod ... 78&lang=en


CheckFlashConfig prints out:
Code: Select allFlash real id:   001640E0
Flash real size: 4194304

Flash ide  size: 4194304
Flash ide speed: 80000000
Flash ide mode:  DOUT
Flash Chip configuration ok.


Which option do i choose?
If i select more spiffs 1M vs 4M, does that mean i have have less space for that actual program?

Re: Which Flash size do i select?

PostPosted: Thu Feb 07, 2019 3:43 am
by QuickFix
In short:
  • Choose a setting that reflects your available flash size (i.e. 4Mbit)
  • Determine the amount of needed SPIFFS: if you want to use OTA, the size of SPIFFS must be at least half the size of available flash
  • An entry in the Arduino IDE like "X (Y SPIFFS)" under the "Tools"->"Flash size" settings means: "Total memory X of which Y is used for SPIFFS" for instance "4M (3M SPIFFS)" means: "Total flash memory of 4Mbit of which 3Mbit is used for SPIFFS"

Re: Which Flash size do i select?

PostPosted: Thu Feb 07, 2019 4:14 am
by Pablo2048
Sorry, but @QuickFix is IMO wrong.
1. 4Mbit != 4M (4194304 bytes)
2. If you want to use OTA there has to be enough space for OTA in program area (not in the SPIFFS), so choose memory size accordingly to be twice size available for program. Because the naturality of ESP8266 which has maximum program size of ~1MB I'm using 2M (2M SPIFFS) - enough space for OTA to work even if my code is 1MB. So if you want to use OTA and don't want to care about your program size, the size of the SPIFFS must be UP TO half size of 4M flash.

Re: Which Flash size do i select?

PostPosted: Thu Feb 07, 2019 9:51 am
by QuickFix
Pablo2048 wrote:Sorry, but @QuickFix is IMO wrong.

You're absolutely right, sorry for 1. the wrong magnitude and 2. the wrong picture I had about these settings.