Skip to content

Update littlefs to v2.11.2#3270

Merged
josesimoes merged 1 commit intonanoframework:mainfrom
josesimoes:update-littlefs
Mar 13, 2026
Merged

Update littlefs to v2.11.2#3270
josesimoes merged 1 commit intonanoframework:mainfrom
josesimoes:update-littlefs

Conversation

@josesimoes
Copy link
Member

@josesimoes josesimoes commented Mar 13, 2026

Description

  • Update CMake files.
  • Update code to deal with breaking changes in path handling (littlefs v2.10).
  • Fixed several build warnings in netcore driver.
  • Update dev containers and bump versions.

Motivation and Context

  • Updates littlefs to latest version.
  • Now in sync with current ESP32 IDF.

How Has This Been Tested?

  • Running nanoFramework.System.IO.FileSystem unit tests.

Screenshots

image

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dev Containers (changes related with Dev Containers, has no impact on code or features)
  • Dependencies/declarations (update dependencies or assembly declarations and changes associated, has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).

Summary by CodeRabbit

  • Chores

    • Updated development container base images to their latest available versions
    • Upgraded LittleFS library dependency from v2.9.3 to v2.11.2 across build configurations
  • Bug Fixes

    • Fixed path normalization to safely handle edge cases and prevent undefined behavior
    • Enhanced type safety in file seek and truncation operations
    • Improved string handling security using safer string operations in path processing

- Update CMake files.
- Update code to deal with breaking changes in path handling (littlefs v2.10).
- Fixed several build warnings in netcore driver.
- Update dev containers and bump versions.
@josesimoes josesimoes added the Area: Common libs Everything related with common libraries label Mar 13, 2026
@nfbot
Copy link
Member

nfbot commented Mar 13, 2026

@josesimoes I've fixed the checklist for you.
FYI, the correct format is [x], no spaces inside brackets, no other chars.

@nfbot nfbot added Area: Config-and-Build Area: Dev-Containers Type: enhancement Type: dependencies Pull requests that update a dependency file(s) or version labels Mar 13, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

Walkthrough

Updates LittleFS dependency from v2.9.3 to v2.11.2 across development containers, build configuration, and pipelines. Updates dev container base images to newer versions. Fixes path normalization and buffer handling issues in file system drivers with improved type casting and string safety functions.

Changes

Cohort / File(s) Summary
Dev Container Base Images
.devcontainer/All/Dockerfile.All, .devcontainer/ChibiOS/Dockerfile.ChibiOS, .devcontainer/ThreadX/Dockerfile.ThreadX
Updated base image versions: All v2.59→v2.60, ChibiOS v1.36→v1.37, ThreadX v1.36→v1.37.
LittleFS Version Updates
.devcontainer/All/Dockerfile.All.SRC, .devcontainer/All/scripts/git-pull-repos.sh, .devcontainer/ChibiOS/Dockerfile.ChibiOS.SRC, .devcontainer/ThreadX/Dockerfile.ThreadX.SRC, azure-pipelines.yml, targets/ChibiOS/CMakeLists.txt
Updated LittleFS dependency from branch v2.9.3 to v2.11.2 across build configurations and CI pipelines.
File System Driver Improvements
targets/ChibiOS/_littlefs/littlefs_FS_Driver.cpp, targets/netcore/littlefs/littlefs_FS_Driver.cpp
Enhanced path normalization with buffer overflow guards; ensured root path always returns single slash. Added type casts for seek/truncate operations; improved string handling with secure functions (strtok_s, strcat_s) in path parsing and directory creation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Update littlefs to v2.11.2' directly and clearly summarizes the main change across all modified files.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

@josesimoes josesimoes merged commit f387824 into nanoframework:main Mar 13, 2026
25 of 30 checks passed
@josesimoes josesimoes deleted the update-littlefs branch March 13, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Common libs Everything related with common libraries Area: Config-and-Build Area: Dev-Containers Type: dependencies Pull requests that update a dependency file(s) or version Type: enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants