FlashDB
FlashDB copied to clipboard
LittleFS implementation
Hi FlashDB developer team,
I'm having a look about this DB. It seams very good and during this days I'm trying to use it with my STM32 board. I'm wondering if I can add the possibility to use this DB with LittleFS file system.
What do you think about?
Best regards,
Giulio Dalla Vecchia
Yes. The FlashDB can run on filesystem mode. You can see the linux demo.
Hi @armink,
Thanks for the reply! I've written the functions to work with littleFS file system (open, read, write, erase). I suggest you to create a porting file for each file system, otherwise fdb_file.c become very long and complex.
Best regards,
Giulio Dalla Vecchia
The FDB filesystem mode support POSIX and LIBC API mode. Most filesystems support this type of API. So there is no need to modify the fdb_file.c
file.
In many embedded systems LittleFS is used as file system. It is very useful also because support static allocation. Unfortunately, it's not POSIX or LIBC API mode. Another file system that is used in embedded application is SPIFFS that is no POSIX or LIBC compliance.
Best regards, GDV
Maybe you can try the RT-Thread RTOS. It has a Virtual File System and support POSIX or LIBC API mode.
The littlefs and FlashDB as software package on the RT-Thread. There is no need to modify the code when using these two packages on any hardware platform.