-->
Page 1 of 1

SPIFFS and the ESP8266 Memory Map

PostPosted: Thu Apr 25, 2019 12:36 pm
by coogle
Hey all,

I have a question regarding SPIFFS and the ESP8266 Memory Map. I have a project that uses the rBoot Bootloader (and the Arduino SDK for ESP8266) and I need to have both SPIFFS and OTA capabilities.

My question is this: Is SPIFFS included in the 1MB Memory Map limit for the ESP8266 or not? I mean if I can only map 1MB of memory at a time and that is ROM + SPIFFS or just ROM, where the SPIFFS address can be outside of the 1MB memory map limit?

If it can be outside the memory map limit I have a follow up -- my linker script looks like this at the moment based on the assumption SPIFFS is limited by the 1MB memory map limit (on a 4M flash):

Code: Select allMEMORY
{
  dport0_0_seg :                        org = 0x3FF00000, len = 0x10
  dram0_0_seg :                         org = 0x3FFE8000, len = 0x14000
  iram1_0_seg :                         org = 0x40100000, len = 0x8000
  irom0_0_seg :                         org = 0x40202010, len = 0xFDFF0
}

PROVIDE ( _SPIFFS_start = 0x40300000 );
PROVIDE ( _SPIFFS_end = 0x403FC000 );
PROVIDE ( _SPIFFS_page = 0x100 );
PROVIDE ( _SPIFFS_block = 0x1000 );


The intention is a structure roughly as follows in memory:

ROM 0 (~786k)
SPIFFS 0 (~262k)
ROM 1 (~786k)
SPIFFS 1 (~262k)

If SPIFFS isn't subject to the memory map limit it would allow me to do something like:

ROM 0 ~1MB)
ROM 1 ~1MB)
SPIIFS 0 ~1MB
SPIIFS 1 ~1MB

Obviously this is better because I get more memory for programs and for SPIFFS.... but what would that look like in a Linker script (i.e. the PROVIDE(_SPIFFS_start), etc.)

Thanks for any insights!