This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 28cd98c5619 docs/littlefs: Improve documentation about littelfs on
NuttX
28cd98c5619 is described below
commit 28cd98c56199fab9ba3ad61de5780324c4ffc1c6
Author: Matteo Golin <[email protected]>
AuthorDate: Wed Aug 6 10:54:06 2025 -0400
docs/littlefs: Improve documentation about littelfs on NuttX
Describes some of the quirks of using littlefs on NuttX and links to an
issue discussing the sync semantics.
Signed-off-by: Matteo Golin <[email protected]>
---
Documentation/components/filesystem/littlefs.rst | 25 ++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/Documentation/components/filesystem/littlefs.rst
b/Documentation/components/filesystem/littlefs.rst
index fb54b6adfdd..8e07e074818 100644
--- a/Documentation/components/filesystem/littlefs.rst
+++ b/Documentation/components/filesystem/littlefs.rst
@@ -4,3 +4,28 @@ LITTLEFS
A little fail-safe filesystem designed for microcontrollers from
https://github.com/littlefs-project/littlefs.
+
+In NuttX, littlefs can be interacted with through the virtual file system. This
+means that it can be used normally with ``read()``, ``write()``, etc. calls, as
+well as file operations (``fopen()``, ``fclose()``, etc).
+
+.. note::
+
+ Since littlefs is power-fail safe and must commit writes before they are
+ permanently stored (corruption prevention mechanism), it is required to
+ periodically call ``fsync`` on the file to commit your writes. The exact
+ semantics of when littlefs files are committed are discussed in `this issue
+ <https://github.com/apache/nuttx/issues/15840>`_.
+
+
+..note::
+
+ If your littlefs setup is experiencing crashes when you boot, try
+ troubleshooting by tweaking the ``BLOCK_SIZE_FACTOR`` options in Kconfig. A
+ factor of 4 works well for SD cards.
+
+.. warning::
+
+ The littlefs support on NuttX only works with mtd drivers, for storage
+ devices such as flash chips, SD cards and eMMC. Performance on SD cards and
+ eMMC devices is worse than flash.