littlefs_create_partition_image fail: littlefs-python: error: unrecognized arguments: --image...

tomdeboerio
Posts: 1
Joined: Fri Jul 12, 2024 1:54 pm

littlefs_create_partition_image fail: littlefs-python: error: unrecognized arguments: --image...

Postby tomdeboerio » Fri Jul 12, 2024 2:03 pm

Hello,

I have been using littlefs for the last year in my project with no issue whatsoever.
My CMake simply calls the following to create my file system binary and load it into the ESP32:

Code: Select all

littlefs_create_partition_image(website build/website_file_system FLASH_IN_PROJECT)
However, when I tried to compile this morning (7/12/24), it returned the following error during compilation:

Code: Select all

FAILED: CMakeFiles/littlefs_website_bin C:/LocalCode/SW0412_ESP32/build/CMakeFiles/littlefs_website_bin 
cmd.exe /C "cd /D C:\LocalCode\SW0412_ESP32\build && C:\LocalCode\SW0412_ESP32\build\littlefs_py_venv\Scripts\littlefs-python.exe create C:/LocalCode/SW0412_ESP32/build/website_file_system -v --image=C:/LocalCode/SW0412_ESP32/build/website.bin --fs-size=0xc00000 --name-max=64 --block-size=4096"
usage: littlefs-python [-h] [--version] {create,extract,list} ...
littlefs-python: error: unrecognized arguments: --image=C:/LocalCode/SW0412_ESP32/build/website.bin
After investigating further, I found out that the littlefs-python had been updated to version 0.12.0 a few days ago:
https://pypi.org/project/littlefs-pytho ... escription

In the latest description of the package, they talk about the command line interface and the "--image" option is indeed not present.
I assume that the package has updated its interface and the esp littleFS component or the esp-idf itself needs to be updated.

While waiting for a fix to happen, is there anything I can do to fix the issue and be able to keep on working ?
For example, how could I force the esp-idf virtual environment to use an older version of littlefs-python ?

beatloman91
Posts: 1
Joined: Sun Jul 14, 2024 12:03 pm

Re: littlefs_create_partition_image fail: littlefs-python: error: unrecognized arguments: --image...

Postby beatloman91 » Sun Jul 14, 2024 12:16 pm

The solution I cooked up

create folder "components" if you don't have it yet. run "mv managed_components/joltwallet__littlefs components/joltwallet_littlefs". Edit components/joltwallet__littlefs/project_include.cmake" and find a line "add_custom_target(littlefs_${partition}_bin ALL..." and remove --image option and -v options as well. Also you can lock your littlefs-python version by editing image-building-requirements.txt to something like "littlefs-python==0.12.0". Run idf.py build (remove build/ folder before)

ESP_adokitkat
Posts: 50
Joined: Thu Jun 22, 2023 12:50 pm

Re: littlefs_create_partition_image fail: littlefs-python: error: unrecognized arguments: --image...

Postby ESP_adokitkat » Sun Jul 14, 2024 11:05 pm

According to the maintainer you simply need to update `littlefs` (`esp_littlefs`) to the latest version (v1.14.8):

https://github.com/joltwallet/esp_littl ... 2225814879

Who is online

Users browsing this forum: Majestic-12 [Bot] and 88 guests