arduino-esp8266fs-plugin icon indicating copy to clipboard operation
arduino-esp8266fs-plugin copied to clipboard

4M (2M SPIFFS) - possible?

Open bebo-dot-dev opened this issue 9 years ago • 5 comments
trafficstars

Not really an issue, just a question. Is it possible to split flash in half where 50% is used for firmware code and 50% is used for SPIFFS?

I see the definitions defined in boards.txt but I'm not sure if to get this working, this is a case of just creating a new board profile using the eagle.flash.4m.ld and specifying a new SPIFFS start address or if a brand new eagle.flash.* layout would be required.

bebo-dot-dev avatar Mar 16 '16 08:03 bebo-dot-dev

the ESP maps only 1MB of the flash and that is the reason such setting does not exist :) Only 1MB can be used for sketch

me-no-dev avatar Mar 16 '16 08:03 me-no-dev

It's possible to do that, but you won't be able to run code which is above 1M mark. So this may be useful for OTA updates if the size of your firmware exceeds 512k, but I haven't seen any project which approaches this size yet. If you do that, then yes, you need to create a linker script variant and add an entry to boards.txt.

igrr avatar Mar 16 '16 08:03 igrr

Running out of free space for OTA update was one of the things I was thinking about..but it's a concern that's probably some way off because my .bin is currently 312,168 bytes when built.

Learning about how to create a new linker script variant .ld sounds interesting though. Do you know if there's any info about how to do this anywhere?

bebo-dot-dev avatar Mar 16 '16 08:03 bebo-dot-dev

how about this? http://wiki.jackslab.org/images/Esp8266-flash-layout-ota-4096.png Is this configuration possible with Arduino IDE?

ghost avatar Jan 08 '17 05:01 ghost

Hi, please see the attached linker script for 2M/4M variant. Also there is need to change boards.txt (now probably by some python script) with this: generic.menu.FlashSize.4M2M=4M (2M SPIFFS) generic.menu.FlashSize.4M2M.build.flash_size=4M generic.menu.FlashSize.4M2M.build.flash_ld=eagle.flash.4m2m.ld generic.menu.FlashSize.4M2M.build.spiffs_start=0x200000 generic.menu.FlashSize.4M2M.build.spiffs_end=0x3FB000 generic.menu.FlashSize.4M2M.build.spiffs_blocksize=8192 generic.menu.FlashSize.4M2M.build.spiffs_pagesize=256 generic.menu.FlashSize.4M2M.upload.maximum_size=1044464

eagle.flash.4m2m.zip

Pablo2048 avatar Dec 14 '17 11:12 Pablo2048