Using littlefs in Zephyr with SDK 2.7.0

I'm trying to use littlefs in Zephyr with SDK 2.7.0

My code is based on the example project  "littlefs" and it compiles without problem using SDK 2.7.0

I'm using nRF Connect for VS Code

I had previously compiled this with an earlier version of the SDK and it compiled and executed properly.

My prj.conf file includes the lines:

CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y
When I attempt to compile, I get an error that indicates that the file "lfs.h" can't be found.   Searching through the DevZone database suggested adding some lines to add "include" search paths (even though they aren't needed with the example project).   So I added lines to my CMakeLists.txt:
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/fs)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/zephyr/subsys/fs)
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/../modules/fs/littlefs)
and now it finds the "lfs.h" header file.
But a new error appears indicating that "CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE" is undeclared.     (Again, this doesn't happen in the example project.)
From the documentation, it appears that this has a default value of 32, so I tried adding the line:
CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE=32
to prj.conf, but this didn't fix things...
Why am I seeing these errors in my project, but not in the example project?    Is it because my project is not in the same directory tree as the SDK?   If so, is there a way to avoid this without having to list all of the missing directories?
What am I missing that the "CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE" is not defined in my project?
Thanks!!
Parents Reply Children
No Data
Related