platformio / platform-espressif8266

Espressif 8266: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif8266
Apache License 2.0
323 stars 219 forks source link

support littlefs for upcoming esp8266 arduino core release #173

Closed liebman closed 4 years ago

liebman commented 4 years ago

The next release of Arduino core for esp8266 will have support for more than one filesystem type. This should be supported.

DaleMitchell commented 4 years ago

Bump?

pfeerick commented 4 years ago

Further this thread, StridingDragon has come up with a way to 'trick' PlatformIO into creating/uploading a LittleFS formatted file system for the ESP32 using an extra_script, so hopefully that makes this easier to implement formally, now that it has been live since 2.6.0 of the ESP8266 core.

https://community.platformio.org/t/how-to-define-littlefs-partition-build-image-and-flash-it-on-esp32/11333/3

CODeRUS commented 4 years ago

SPIFFS is now officially deprecated: https://github.com/esp8266/Arduino/pull/7263

andig commented 4 years ago

Joining the party. Not sure even how to declare the LittleFS dependency (not mentioned in https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#spiffs-and-littlefs). Should be the same for ESP32?

valeros commented 4 years ago

Added in v2.6.0

jbasiago commented 4 years ago

What was the fix here? When I look at configuring options on my project, I do not see the option board_build.filesystem even though I've loaded version 2.6.0 of the Expressif 8266 platform. Does this fix eliminate the need for any additional outside scripts of do I still have to fool around with python to build the .bin file for the filesystem. As far as I can tell, this fix has done nothing for me. I'm using PlatformIO on CLion. Thanks for any help.

CODeRUS commented 4 years ago

@jbasiago check https://docs.platformio.org/en/latest/platforms/espressif8266.html#using-filesystem

jbasiago commented 4 years ago

The issue I was having was I had not noticed the Uploadfs target in the PlatformIO build configurations in Clion. Small details get you every time. Once I selected this target, it all worked as described. Thanks for the help.

45gfg9 commented 4 years ago

Oh, so I guess I ran into the same situation... I am using PIO on VSCode. As I go with example code which uses SPIFFS, compiler gives out deprecation warnings, so I switched to LittleFS and found out SPIFFS image does not work with LittleFS. Then I found this: https://docs.platformio.org/en/latest/platforms/espressif8266.html#selecting-appropriate-filesystem and added board_build.filesystem = littlefs to platformio.ini. But next time when I select Upload File System image it still does SPIFFS image. I don't know where went wrong. Is it the problem with me or PIO? If the VSCode portion of PIO doesn't support switching to LittleFS image automatically, then is there a script or something I can use? Thanks a million.

jbasiago commented 4 years ago

I don't know about VSCode, but in CLion, when you run the UploadFS task with board_build.filesystem = littlefs , platformIO generates a file littlefs.bin under .pio/build/"board"/ directory. Perhaps you need to delete the SPIFFS.bin file that might be there. Try cleaning and rebuilding. This works for me in CLion. Good luck.

drzony commented 4 years ago

@45gfg9 Make sure that:

  1. board_build.filesystem = littlefs is in correct place (either under [env] or [env:myboard])
  2. Esp8226 platform is updated to the latest version (PIO Home->Libraries->Updates and PIO Home->Platforms->Updates)
  3. Make sure Arduino core is the latest (this should update with 2. unless you have some overrides such as framework = xxx),
45gfg9 commented 4 years ago

Thanks! I was using 2.5.3 version of framework. As I upgrade to 2.6.0 it worked.