Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed littleFS #3765

Closed
laercionit opened this issue Feb 25, 2020 · 29 comments
Closed

Embed littleFS #3765

laercionit opened this issue Feb 25, 2020 · 29 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@laercionit
Copy link

Hello .. Good night.
I've been designing an aquarium controller for a few years.
I currently use ESP8266, the code has already been ported and adapted to run on ESP32. Fantastic speed and differences between MCUs.

I'm still using SPIFFS in ESP32, because I didn't see anything native to LITTLEFS. By my studies it is more reliable and I have been using it for some time on ESP8266.

Any chance of LITTLEFS being incorporated into the CORE ARDUINO ESP32?

@beegee-tokyo
Copy link
Contributor

Not sure if anybody works on that.
You can try the esp32_littleflash
But I didn't try that yet.

@laercionit
Copy link
Author

LittleFS is much more robust than SPIFFS, does not lose formatting due to power failure.
Currently it is already incorporated in ESP8266, as it is something far superior and I see that the ESP32 CORE has advanced, I found it coherent to know if there were plans to develop native Data Upload by IDE and even partition with this type of configuration.

@zekageri
Copy link

It would be cool if someone would port it to esp32. SPIFFS is limited if we use 16mb esp32s. I have to use a 7mb ota 7mb app and 1mb flash because the slowness of the spiffs. :(

@stale
Copy link

stale bot commented May 18, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label May 18, 2020
@JohnMacrae
Copy link
Contributor

It would be very welcome - not least for code portability reasons. :)

@stale
Copy link

stale bot commented May 29, 2020

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label May 29, 2020
@sblantipodi
Copy link

since SPIFFS has been deprecated on ESP8266, LittleFS should be integrated in ESP32.
there is no reason to deprecate something on ESP8266 and leave it live on ESP32.

@lbernstone
Copy link
Contributor

While it would be nice to have a port, littleFS is not supported in esp-idf, so is unlikely to become canon here, and it is not part of Arduino compatibility (the purpose of this project).
The beauty of the Arduino model is that 3rd party libraries can come and go without putting the onus of maintenance on the chip manufacturers.

@sblantipodi
Copy link

and what is the sense of deprecating SPIFFS on ESP8266 and not on ESP32?

@lbernstone
Copy link
Contributor

lbernstone commented Jun 14, 2020

You will need to ask them. It may be deprecated on esp-idf eventually and replaced with LittleFS. At that point, it will be trivial to add to arduino. The ESP32 and ESP8266 projects are not welded together.

@me-no-dev
Copy link
Member

wait... why should we care that 8266 crew deprecated SPIFFS and somehow follow them? I am really confused by such way of thinking. They did not bother to ask or discuss this with us. SPIFFS is supported in IDF and is supported here. LittleFS has nothing to do with it.

@sblantipodi
Copy link

are esp8266 and esp32 two separate products?
aren't both espressif products? why do they have different support?
thanks

@me-no-dev
Copy link
Member

8266 Arduino is community supported. Everything else is Espressif. So, 8266 has and does it's own things when we talk Arduino. They do not sync with us and we do not with them. They run NonOS and we run FreeRTOS.

@lorol
Copy link
Contributor

lorol commented Jun 17, 2020

Hi, I managed to make it as a lib, please see this and comment your thoughts:

https://github.com/lorol/arduino-esp32littlefs-plugin
https://github.com/lorol/LITTLEFS

Thank you

@luc-github
Copy link
Contributor

@lorol so littleFS is slower than SPIFFS per your tests ?

@lorol
Copy link
Contributor

lorol commented Jun 17, 2020

@luc-github Writing to LITTLEFS is 4 times faster. Reading is slower. (on my simple test)

@luc-github
Copy link
Contributor

luc-github commented Jun 17, 2020

Sorry I just noted the last number, the reading ones
I will give a try - thank you

@luc-github
Copy link
Contributor

@lorol I have tested with latest ESP32 git - I used the sample and adding time test and size display
it works very well - thank you

.WiFi connected
IP address: 
192.168.1.30
Contacting Time Server

Now is : 2020-06-17 20:01:42

Listing directory: /
  FILE: /hello.txt	SIZE: 6  LAST WRITE: 2020-06-17 20:00:53
  FILE: /hello2.txt	SIZE: 6  LAST WRITE: 2020-06-17 20:00:38
Writing file: /hello.txt
- file written
Appending to file: /hello.txt
- message appended
Reading file: /hello.txt
- read from file:
Hello World!
Renaming file /hello.txt to /foo.txt
- file renamed
Reading file: /foo.txt
- read from file:
Hello World!
Testing file I/O with /test.txt
- writing................................................................
 - 1048576 bytes written in 14731 ms
- reading................................................................
- 1048576 bytes read in 885 ms
Writing file: /hello.txt
- file written
Listing directory: /
  FILE: /foo.txt	SIZE: 14  LAST WRITE: 2020-06-17 20:01:42
  FILE: /hello.txt	SIZE: 6  LAST WRITE: 2020-06-17 20:01:58
  FILE: /hello2.txt	SIZE: 6  LAST WRITE: 2020-06-17 20:00:38
  FILE: /test.txt	SIZE: 1048576  LAST WRITE: 2020-06-17 20:01:42
Deleting file: /foo.txt
- file deleted
Deleting file: /test.txt
- file deleted
Total: 1507328, Used: 8192
Test complete

@lorol
Copy link
Contributor

lorol commented Jun 17, 2020

Yes, you can compare the "feel" of running to SPIFFS.
LITTLEFS looks faster overall. At least I like to be this way ... after so much time spent to make it working :)

@luc-github
Copy link
Contributor

luc-github commented Jun 17, 2020

FYI to compare speed with ESP32 FAT also

Testing file I/O with /test.txt
- writing................................................................
 - 1048576 bytes written in 13057 ms
- reading................................................................
- 1048576 bytes read in 276 ms

Writing is pretty close = but for reading FatFS is still 1rst, may be LittleFS need some tunning to get better reading

@lorol
Copy link
Contributor

lorol commented Jun 17, 2020

@luc-github
See if your tests give similar results match these: https://github.com/joltwallet/esp_littlefs#performance
My LITTLEFS implementation is basically a simple hack of joltwallet one, just an Arduino style :)
I started with long painful way of recompiling through ESP-IDF (specific commit of v3.3, used the last time for Arduino esp32 core got ESP-IDF updated) then components ... but with source-only, just rearranged a bit, it works as well.

@luc-github
Copy link
Contributor

the partition was not same size, I will redo tomorrow to compare properly

@lorol
Copy link
Contributor

lorol commented Jun 17, 2020

I don't expect FAT to be beaten on speed, anyway.

@sblantipodi
Copy link

once the job is finished and all works ok,
why don't you open a pull request to ask espressif to insert this patch in the official SDK?

@lorol
Copy link
Contributor

lorol commented Jun 17, 2020

@ because I never made a PR yet :) and also as @me-no-dev said, ESP-IDF is not a community thing ...
Code esp_littlefs project I used is actually an ESP-IDF component. The Arduino core can be plugged to the ESP-IDF as component too. It is a tricky combination between commercial and community effort and priorities. If it works as library - use it. I don't see problems.

@lorol
Copy link
Contributor

lorol commented Jun 17, 2020

@sblantipodi here you go: #4096

@sblantipodi
Copy link

@lorol congrats man

@stale
Copy link

stale bot commented Aug 19, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Sep 2, 2020

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Sep 2, 2020
DanielKnoop pushed a commit to DanielKnoop/ESPAsyncWebServer that referenced this issue Jun 17, 2022
Zwer2k pushed a commit to Zwer2k/ESPAsyncWebServer that referenced this issue Jul 30, 2022
Zwer2k pushed a commit to Zwer2k/ESPAsyncWebServer that referenced this issue Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

9 participants