-
Notifications
You must be signed in to change notification settings - Fork 356
Use LittleFS + #209
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
Use LittleFS + #209
Conversation
Thank you, this is something I've been meaning to do for a long time! But, I can't get the web app to work. It's listing the FS contents in the serial monitor:
But it will not serve any files. I've tried it with the data files gzipped and without. Requests for Requests for any other files, such as index.html, favicon.ico, etc, result in a |
Most other things seem to be working fine. All the REST API calls, such as |
Hmm... Definitely unexpected. Family emergency may limit me for a few days, but definitely unexpected and piqued my interest why that's happening. I did verify the LED (default page) was working.... But didn't know (or test) all the endpoints. Sorry for not catching those issues! |
I think I have a fix for the loss of the first character. Testing now.
Remove the |
8cb78f7 seems to fix Not sure if support for directories was ever implemented (was hard-coded to |
Hi Guys, I remember having had some issues as well when moving to LittleFS or even before. What I see in difference is that in addition to
Maybe this helps? Regards, Btw: I did not yet manage to get the /edit to work with LittleFS (can only list files and content but without directories). But I did not did into that that much as I am not using this. |
OK, disregard. The web app is working fine now, with no code changes, so I'm not sure what was wrong before. The file editor was apparently already broken, and needs updated to the latest version of the FSBrowser example: https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WebServer/examples/FSBrowser That can be done later, completely separate from this PR. |
@tobi01001 ... I just noticed this, and thought I'd call it out, in case it later surprises you (As it did me). if you serve files using |
This PR does three things. Each section is expandable / collapsible:
Upload tool for LittleFS on ESP8266 (arduino IDE):
https://github.com/earlephilhower/arduino-esp8266littlefs-plugin
Move `data` under sketch directory
I missed this in PR #208. The Arduino IDE requires that the web files be located in a subdirectory of the sketch. This restores the ability to upload the files from the IDE.
Move from SPIFFS to LittleFS.
SPIFFS is deprecated. Building with warnings enabled will fill the build log with many warnings as to this fact.
LittleFS is a drop-in replacement.
Here's the difference is the binary sections between commit
0427421 and 7f39a83, using the Arduino IDE:
405,840
399,836
-6,004
28,368
28,444
+76
32,768
(16k
x 2)1,312
1,312
6,816
7,460
+644
30,464
30,464
Basic testing was done on main branch.
Move images from root to `images` subdir
This also moves a few image files from the root of the depot to an
images
subdirectory. These images were not used in thereadme.md
.Move scripts from root to `scripts` subdir
The
scripts
If this PR is approved, I intend to next provide PR for each other "active" branch, to merge these changes in each of those.