LittleFS: fail to create partition image
Posted: Mon Feb 09, 2026 11:03 am
I'm trying to use the CMakeLists.txt compile command to create and upload the file partition when I run the idf.py build command. I'm using IDF version 5.3.4.
I'm porting my code from using SPIFFS to LittleFS. I'm using joltwallet/littlefs. I've added it as a dependency using
I am able to build successfully, but I want to be able to use the compile command to create and upload the file partition when I run the build command. On the ESP Component Registry page url=https://components.espressif.com/co ... anguage=en, it says to add the littlefs_create_partition_image command to the project CMakeList file. For my partition table:
I use this command:
I get the error:
I'm porting my code from using SPIFFS to LittleFS. I'm using joltwallet/littlefs. I've added it as a dependency using
Code: Select all
idf.py add-dependency joltwallet/littlefs==1.20.4Code: Select all
storage, data, littlefs, 0xac0000, 0x540000Code: Select all
littlefs_create_partition_image(storage html FLASH_IN_PROJECT)Code: Select all
PS C:\Users\Anees-Ahmad\Documents\ESP-IDF_Workspace\OTA\OTA-in-facekey\espota\FaceKey_ESPIDF> idf.py fullclean build
Executing action: fullclean
Executing action: remove_managed_components
Executing action: all (aliases: build)
Running cmake in directory C:\Users\Anees-Ahmad\Documents\ESP-IDF_Workspace\OTA\OTA-in-facekey\espota\FaceKey_ESPIDF\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=c:\esp\tools\python_env\idf5.3_py3.11_env\Scripts\python.exe -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 C:\Users\Anees-Ahmad\Documents\ESP-IDF_Workspace\OTA\OTA-in-facekey\espota\FaceKey_ESPIDF"...
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.50.0.windows.1")
CMake Error at CMakeLists.txt:17 (littlefs_create_partition_image):
Unknown CMake command "littlefs_create_partition_image".
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the C:\Users\Anees-Ahmad\Documents\ESP-IDF_Workspace\OTA\OTA-in-facekey\espota\FaceKey_ESPIDF\build\log\idf_py_stderr_output_35560 and C:\Users\Anees-Ahmad\Documents\ESP-IDF_Workspace\OTA\OTA-in-facekey\espota\FaceKey_ESPIDF\build\log\idf_py_stdout_output_35560
PS C:\Users\Anees-Ahmad\Documents\ESP-IDF_Workspace\OTA\OTA-in-facekey\espota\FaceKey_ESPIDF>