Skip to content

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented May 9, 2025

Description

  • Update file_system/CMakeLists.txt to have littlefs be the dependency name, since that is what it will be when used as a managed component
  • Update esp_littlefs submodule to be named littlefs so that it matches the managed component behavior.

Motivation and Context

It was found in testing that the file_system component failed to buid when used as a managed component because the littlfs dependency comes in under the name littlefs, but the repo was originally designed to use esp_littlefs.

Note: I tried initially to add the following code to the file system cmake, but it didn't work in the case that IDF_COMPONENT_MANAGER=0 when building:

# Determine whether file_system is fetched from component registry or from local path
idf_build_get_property(build_components BUILD_COMPONENTS)
if(file_system IN_LIST build_components)
    set(required_littlefs_name esp_littlefs) # Local component
else()
    set(required_littlefs_name littlefs) # Managed component
endif()

How has this been tested?

  • Build and run in a managed component test project.
  • Build and run file_system/example (not managed component) (IDF_COMPONENT_MANAGER=0 idfb)
  • Build and run file_system/example (managed component) (idfb)

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

Copy link

github-actions bot commented May 9, 2025

✅Static analysis result - no issues found! ✅

@finger563 finger563 force-pushed the fix/file-system-deps branch from df075ee to 7c2f4ea Compare May 9, 2025 13:57
@finger563 finger563 self-assigned this May 9, 2025
@finger563 finger563 added bug Something isn't working file system esp_littlefs labels May 9, 2025
@finger563 finger563 changed the title fix(file_system): Fix dependency name when used as a managed component fix(file_system): rename esp_littlefs submodule to littlefs so dependency name is always the same May 9, 2025
@finger563 finger563 merged commit 275827a into main May 9, 2025
78 checks passed
@finger563 finger563 deleted the fix/file-system-deps branch May 9, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working esp_littlefs file system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant