SPIFFS configuration incompatibility

Womboo
Posts: 3
Joined: Thu Jan 21, 2021 6:23 pm

SPIFFS configuration incompatibility

Postby Womboo » Fri Jan 20, 2023 4:01 pm

Hey All,

Thanks in advance for anyone reading.

I'm using the old loboris implementation of spiffs that was made before ESP made their own implementation and we are in the process of updating to IDF 4.X / 5.X from 3.X and would like to remove this dependency. This gives us a lot more functionality for partition control and corruption recovery. In this process I discovered a lot of inefficiency with the SPIFFS configuration too that will be nice to change.

The problem is, the default loboris configuration made the logical block size 8192, where the ESP implementation seems to hard code this to 4092 though the default SPI block size. After much investigation, I do not see an "easy" way to mount/read the old partition from already deployed units using the latest esp_spiffs.c file. I was thinking I could preserve the old implementation alongside the new, to read the old data, store it in ram/flash, format the old spiffs partition to the new format, and save it back. I would have to worry about error trapping along the way and handling power loss in the middle of that process. Seems like quite a lot of work I'd like to avoid, mostly in having dual spiffs implementations.

Right now I modified esp_spiffs.c to hard code a 8192 block size and it works but I would like to preserve the source code. This also means I cannot format the new partition to the new 4096 block size but I could probably with further modification of esp_spiffs.c. Is there a better way to this end?

Thank You

Who is online

Users browsing this forum: No registered users and 140 guests