Provides a set of block device drivers for the littlefs file system. The drivers' interface is very similar to lfs_rambd.h provided with littlefs. See the API reference manual for driver-specific information.
The mtb-example-psoc6-filesystem-littlefs-freertos code example describes the implementation of the littlefs file system on SD card and QSPI NOR flash.
FREERTOS
to the components list when using FreeRTOS.DEFINES=LFS_THREADSAFE
to enable the thread-safety for the littlefs APIs.COMPONENTS=RTOS_AWARE
in the Makefile to enable RTOS-friendly features, such as waiting on a semaphore until read completion is indicated through an interrupt or a callback.Note: The source files under *<littlefs_path>/bd* are ignored from auto-discovery. Therefore, they will be excluded from compilation because some of the files (e.g., lfs_filebd.c) use POSIX file APIs such as open()
and close()
. POSIX APIs are not supported by the ModusToolbox™. If you implement POSIX APIs, you can include those files for compilation by adding them to the SOURCES
and INCLUDES
variables in the Makefile.
The dependencies except abstraction-rtos are automatically pulled in when you run the make getlibs
command in the ModusToolbox™.
abstraction-rtos library if RTOS support is required.
Note: abstraction-rtos is automatically pulled in only when you add FreeRTOS using the Library Manager; otherwise, add it manually.