-
Notifications
You must be signed in to change notification settings - Fork 7.6k
SPIFFS support #411
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
Comments
After I'm done with my current assignment, next is SPIFFS. FS is already implemented and SPIFFS will extend it the same way that SD and SD_MMC currently do, so you can maybe start from that and switch to SPIFFS when done. |
Thanks for that fast response! I tried the SD library and it works well on my dev board, but unfortunately the production HW doesn't allow for an SD card. |
I need SPIFFS to save config. |
@bestpika Take a look at the Preferences library. I used it to save config info. |
@bbx10 Can the library save array? Oh, I can save json string and use ArduinoJson to parse it. |
Maybe this helps https://github.com/joysfera/esp-idf-spiffs |
realy need the SPIFFS on the ESP32 :-( SD works but its no option because to much hardware |
Maybe this help until the official one https://github.com/copercini/arduino-esp32-SPIFFS |
@copercini captured your reference under projects |
@me-no-dev Is the SPIFFs work something that you are actively working? Do you need assistance, for development or testing or otherwise? I will try to capture the current state under projects if you have details. |
@copercini Can you elaborate on the "Known Issue" regarding "It doesn't support file upload yet." Are you referring to the ESP8266 Sketch Data Upload tool not supporting ESP32 or something else? Are you working to resolve the issue? |
Exactly! |
Looks like it’s just add another "if" for ESP32 here which parses partitions CSV And recompile mkspiffs with ESP32 headers from here But @me-no-dev started the official implementation, so it’s best wait he definitive solution. |
If "official implementation is started" do you have one expected release date? Thanks! |
An alternative to the Sketch Data Upload tool is to upload the files using HTTP POST. For example, load the FSBrowser example, then
|
great success w/ @bbx10's |
@pbecchi It's implemented like me-no-dev comment above
So I think you will not need to change some or much code @boneskull nice to hear it =) |
Thanks |
@copercini Where do we stand with the implementation of the Sketch Data Upload tool for ESP32? Did you start this, is it deferred or in some other state. I ask because if there is no plan for this or you are busied out with all your other contributions, it is something I could work on. Just let me know any status details. |
It is planned but depends on mkspiffs and it being on the same spiffs version ;) will get it done ;) ota already supports it |
As I understand @me-no-dev will re-write SPIFFS things, so unofficial development is paused, but pretty stable =) Will talk with @me-no-dev about mkspiffs, because I have something working here... |
Great, I'm using your lib now @copercini for the time being and it works well. |
SPIFFS is in ;) |
Thanks me-no-dev for your work on SPIFFS!
Any recommendations to fix this problem? |
@PhilippRott @me-no-dev Try adding true as the first parameter to begin(). This fixed the problem for me. The first parameter is formatOnFail so SPIFFS is formatted if the mount fails.
@copercini Thanks for the unofficial SPIFFS library. It has worked without fail since you released it. |
@bbx10 Thanks! you just made my day =) |
@bbx10 Thanks, worked for me perfect! |
Is Preference (https://github.com/espressif/arduino-esp32/blob/master/libraries/Preferences/src/Preferences.h) reading and writing to the same memory region as SPIFFS? Is there a memory map somewhere showing the different memory regions and there default sizes for the ESP32? |
No it does not. There is partition scheme https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/default.csv (Preferences go to NVS) |
@me-no-dev Thanks! Looking at the partition scheme, it seems like the max program size is 81920 bytes (0x140000) since that whats fits into the ota-space. So my application is located in "ota_0" and when I update the program using OTA it will be uploaded to "ota_1" and then a pointer is changes to point to "ota_1" and the device is restarted? Next time it will upload to "ota_0" and re-point to ota_0, is that how it works? |
0x140000 = 1310720B (1.25MB) that 520 is used for many things ;) not available to you |
Just to expand on what @me-no-dev said: 520KB is the total amount of RAM. That includes IRAM (instruction RAM), DRAM (data RAM), and RTC memory. "System and memory" chapter of the ESP32 Technical reference manual has a table explains this in more detail. Specifically, there is 328 KB of DRAM available on the chip (the rest is IRAM and RTC RAM). Some of that is used by the OS, some is used by tasks created during SDK startup. An empty application which just prints the amount of available heap will report ~300KB of free heap, in the latest IDF. Enabling features such as WiFi, BT, and dual core support, reduces the amount of memory available to applications. I guess this is where the 280KB number comes from. |
Ok, thanks for the clarification. |
@bbx10 Thanks, worked for me perfect, too! |
@me-no-dev @igrr What are we using as the equivalent of the file system uploader plugin for ESP32? If the update to the esp8266 file system uploader (https://github.com/esp8266/arduino-esp8266fs-plugin) is the intended solution, please add me to that project and I can make the changes. |
@lonerzzz https://github.com/me-no-dev/arduino-esp32fs-plugin :) mkspiffs works since friday :) |
@me-no-dev, @igrr |
@beegee-tokyo I don't think that you can. PIO would need a custom implementation for that. |
@me-no-dev
;) :) |
@me-no-dev Perfect, I am now marking SPIFFS as done in the Project tracking area. Didn't realize the UI portion was also completed. |
@lonerzzz didn't say anything because mkspiffs was not working :) had to get that fixed first |
For records: https://docs.platformio.org/en/latest/platforms/espressif32.html#uploading-files-to-file-system-spiffs |
Could you share the status of SPIFFS support? In migrating our ESP8266 projects to ESP32 this is the one thing that is currently holding us up. Looking forward to an eta update.
All the best,
Tijn
The text was updated successfully, but these errors were encountered: