[Answered] FAT File system support into flash memory ...

User avatar
kolban
Posts: 421
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

[Answered] FAT File system support into flash memory ...

Postby kolban » Tue Jan 10, 2017 4:42 am

I see that we have (as of the date of this post) a new component that provides FatFs file system support. I also note that this appears to provide first class support for micro SD cards. The purpose of this posting is to inquire about support for FatFs mapped onto SPI flash memory. Is that a supported/viable operation? Should we be using SPIFFs instead?

If FatFs mapped to SPI flash memory is an option, do we have the disk-io mapping modules for ESP32 available?
Last edited by kolban on Tue Jan 10, 2017 2:22 pm, edited 1 time in total.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

ESP_igrr
Posts: 220
Joined: Tue Dec 01, 2015 8:37 am

Re: FAT File system support into flash memory ...

Postby ESP_igrr » Tue Jan 10, 2017 6:13 am

I haven't added flash support for diskio yet mostly because i want to test it along with flash encryption feature, and this needs some time. I will do this post-2.0, which will be released very soon.

ESP_Sprite
Posts: 362
Joined: Thu Nov 26, 2015 4:08 am

Re: FAT File system support into flash memory ...

Postby ESP_Sprite » Tue Jan 10, 2017 6:16 am

At the moment, it's not supported yet. You can in theory plunk a FAT partition on the SPI flash pretty easily if you only implement read-only support. Write support is harder, because the sector size of flash is 4K and I don't think that works nicely with FAT. Also, FAT is made for hard disks, which don't really care if the same sector is overwritten thousands of times. Flash does care, and plunking FAT on a flash directly can wear it out pretty quickly. To compensate for that, you'd have to create a flash translation layer... and at that point you're probably better off using a designated flash-capable filesystem like spiffs.

Who is online

Users browsing this forum: WiFive and 2 guests