How to use virtual file system.?

rahul.b.patel
Posts: 62
Joined: Wed Apr 19, 2017 6:35 am

How to use virtual file system.?

Postby rahul.b.patel » Wed Apr 19, 2017 6:57 am

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.

perryc
Posts: 25
Joined: Fri Feb 17, 2017 1:29 am

Re: How to use virtual file system.?

Postby perryc » Wed Apr 19, 2017 3:01 pm

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

rahul.b.patel
Posts: 62
Joined: Wed Apr 19, 2017 6:35 am

Re: How to use virtual file system.?

Postby rahul.b.patel » Thu Apr 20, 2017 6:57 am

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.

perryc
Posts: 25
Joined: Fri Feb 17, 2017 1:29 am

Re: How to use virtual file system.?

Postby perryc » Fri Apr 21, 2017 2:50 pm

check prv msg. Code needs some cleanup and moving to github then the masses can have at it.

rahul.b.patel
Posts: 62
Joined: Wed Apr 19, 2017 6:35 am

Re: How to use virtual file system.?

Postby rahul.b.patel » Sat Apr 22, 2017 4:09 am

I found the issue, I didn't update the partition table for spiffs. Its working now.

Fugazi
Posts: 42
Joined: Wed Apr 26, 2017 9:05 pm

Re: How to use virtual file system.?

Postby Fugazi » Wed May 03, 2017 8:14 am

Do you have some example code for this - just attempting the same myself , help would be useful ! :)

Thanks

mjmorrison
Posts: 26
Joined: Thu Nov 03, 2016 9:06 pm

Re: How to use virtual file system.?

Postby mjmorrison » Fri May 12, 2017 11:24 pm

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?

jgfrmesp
Posts: 6
Joined: Mon May 15, 2017 11:06 pm

Re: How to use virtual file system.?

Postby jgfrmesp » Mon May 15, 2017 11:09 pm

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

rahul.b.patel
Posts: 62
Joined: Wed Apr 19, 2017 6:35 am

Re: How to use virtual file system.?

Postby rahul.b.patel » Tue May 16, 2017 4:25 am

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.

jgfrmesp
Posts: 6
Joined: Mon May 15, 2017 11:06 pm

Re: How to use virtual file system.?

Postby jgfrmesp » Tue May 16, 2017 7:15 am

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

Who is online

Users browsing this forum: No registered users and 165 guests