5 years ago.

Use LittleFS w/ STM32L475 (1MB ROM 128KB RAM) w/ Free RTOS in C++ (gcc) w/ SST26WF064C 8MB NOR flash


We are considering using LittleFS in our product: - IoT BLE device - STM32L475 MCU (Cortex ARM M4 uP); ROM 1MB; RAM 128KB - Application level code: C++ (compiler gcc) - Low level drivers/OS code: ASM/C - OS: FreeRTOS (with dynamic memory) - External Flash: (not final) microchip SST26WF064C 8MB NOR (4K blocks) - We are also considering also NAND flashes but my understanding is that LittleFS is more designed for NOR flashes - Storage use cases: - temp storage of firmware code for firmware upgrade (up to 1MB) - logs (128 Bytes per log) up to 50 logs - messages (256 bytes per message) up to 200 messages - settings/configuration/mfg/production data - some other NV typical data My questions are: 1. Can you please first answer if LittleFS can be used? 2. What are ROM/RAM/OS/Performance requirements 3. Other requirements/considerations 4. Is LittleFS good solution for this purpose 5. What is your view about using NAND flash in our product

Thank you.

Kind regards, Yuval

Question relating to:

1 Answer

5 years ago.

Hi Yuval,

LittleFS is an independent mbed os based system that could potentially work with another FreeRTOS based system. LittleFS works with a FAT file system backed by either an secure digital card or NOR Flash memory.

I will get back to you on the performance related information.


Naveen, team mbed.

Hi Naveen,

Thanks very much for your response, I look forward to hear from you about performance related info.

Another two comments/questions: 1. Is FAT file system used for LittleFS? I thought this (FAT) is not part of it (LittleFS) and from the code of M-bed OS (version 5.9) it looks like this is separate/alternative to LittleFS. 2. How to port (only) the LittleFS over from M-bed OS to our system? is there any manual/instructions from your end for that rather then normal porting process of integrating it while removing dependencies and hook them to our system (STM32L475 + FreeRTOS).

Thank you, Yuval

posted by Yuval Cohen 17 Sep 2018

With FreeRTOS, it is possible that you may need to provide the access to the low-level storage through the LittleFS block device API.

Size Requirements Current: - 4 blocks for superblock - 2 blocks per directory - 1 block minimum per file This is being improved upon in the upcoming version of LittleFS

Improvements to LittleFS https://github.com/ARMmbed/littlefs/pull/85

Available Benchmarking data https://github.com/RIOT-OS/RIOT/pull/8316

W.R.T RTOS/Toolchains, there is this util file that can overloaded, but the defaults should be very portable: https://github.com/ARMmbed/littlefs/blob/master/lfs_util.h

Possibly helpful discussion about interfacing with another discussion: https://github.com/ARMmbed/littlefs/issues/1#issuecomment-352613305

Support: mbed-os is a free and open source offering and comes with Apache 2 license. More details here: https://github.com/ARMmbed/mbed-os/blob/master/LICENSE

posted by Naveen Kaje 18 Sep 2018