How to use virtual file system.?
-
- Posts: 62
- Joined: Wed Apr 19, 2017 6:35 am
How to use virtual file system.?
Hello,
I have a requirement of implementing file system for given flash partition location. It will be great help if I can have a demo example of how to use virtual file system in ESP32 to store file in spi flash, also how other options like spiffs or nvs can be used for the same if possible.
Thank You.
I have a requirement of implementing file system for given flash partition location. It will be great help if I can have a demo example of how to use virtual file system in ESP32 to store file in spi flash, also how other options like spiffs or nvs can be used for the same if possible.
Thank You.
Re: How to use virtual file system.?
I got a port of the LUA's SPIFFS component running under ESP-IDF-V2.0 last week so finally have a spiffs based vfs. It's still relatively untested but msg me if you'd like a link to clone the project. There is supposed to be a official version coming from espressif but we were getting desperate so hacked something together.
Perry
Perry
-
- Posts: 62
- Joined: Wed Apr 19, 2017 6:35 am
Re: How to use virtual file system.?
Thank you Perry for fast reply. I also have cloned LUA's SPIFFS component but still can't create file using "SPIFFS_creat()". I am getting -10000 error code in return though i got SPIFF_mount successfully. If you have created file successfully with SPIFFS, can you please provide me steps for the same.
Thank You.
Thank You.
Re: How to use virtual file system.?
check prv msg. Code needs some cleanup and moving to github then the masses can have at it.
-
- Posts: 62
- Joined: Wed Apr 19, 2017 6:35 am
Re: How to use virtual file system.?
I found the issue, I didn't update the partition table for spiffs. Its working now.
Re: How to use virtual file system.?
Do you have some example code for this - just attempting the same myself , help would be useful !
Thanks
Thanks
-
- Posts: 26
- Joined: Thu Nov 03, 2016 9:06 pm
Re: How to use virtual file system.?
I have a related question around SPIFFS vs NVS partition.
I have been using a partition table like this for a while
```
nvs, data, nvs, 0x9000, 0x4000
phy_init, data, phy, 0xd000, 0x1000
otadata, data, ota, 0xe000, 0x2000
ota_0, app, ota_0, 0x10000, 1M
ota_1, app, ota_1, , 1M
spiffs, data, nvs, , 1M
```
Recently changed nvs to SPIFFS because I saw that it was an option... Are there any functional differences between the two partition types?
I have been using a partition table like this for a while
```
nvs, data, nvs, 0x9000, 0x4000
phy_init, data, phy, 0xd000, 0x1000
otadata, data, ota, 0xe000, 0x2000
ota_0, app, ota_0, 0x10000, 1M
ota_1, app, ota_1, , 1M
spiffs, data, nvs, , 1M
```
Recently changed nvs to SPIFFS because I saw that it was an option... Are there any functional differences between the two partition types?
Re: How to use virtual file system.?
Hi,
I tried to use the spiffs code of the esp32+lua project plus the spiffs code of kolban.
However, no joy. The code compiles, but the file seems not to to be saved.
I can not read it back.
Is it possible to share a working setup of vfs/spiffs?
Thanks,
-- Jaap
I tried to use the spiffs code of the esp32+lua project plus the spiffs code of kolban.
However, no joy. The code compiles, but the file seems not to to be saved.
I can not read it back.
Is it possible to share a working setup of vfs/spiffs?
Thanks,
-- Jaap
-
- Posts: 62
- Joined: Wed Apr 19, 2017 6:35 am
Re: How to use virtual file system.?
Hello Jaap,
Tell me if I have not got it right, you have problem in creating file when using vfs with spiffs right..? and spiffs alone work properly or you have problem with spiffs also.?
Because I have spiffs mounting is working properly but when I use spiffs with vfs I cant create file with vfs.
Thanks.
Tell me if I have not got it right, you have problem in creating file when using vfs with spiffs right..? and spiffs alone work properly or you have problem with spiffs also.?
Because I have spiffs mounting is working properly but when I use spiffs with vfs I cant create file with vfs.
Thanks.
Re: How to use virtual file system.?
Yes, that precisely the case. Spiffs raw (so without vfs) works fine.
As soon as I use the vfs part (I used the code at https://github.com/nkolban/esp32-snippe ... vfs/spiffs)m I can not read the file back (I can not see if it is written in the first place).
Best,
Jaap
As soon as I use the vfs part (I used the code at https://github.com/nkolban/esp32-snippe ... vfs/spiffs)m I can not read the file back (I can not see if it is written in the first place).
Best,
Jaap
Who is online
Users browsing this forum: MicroController and 268 guests