Page 1 of 1

Error when creating littlefs partition image using littlefs_create_partition_image

Posted: Wed Mar 09, 2022 4:55 pm
by lukecam95
Hi All,

I am trying to convert my the file system I use from spiffs to littlefs, however when I try to use the CMake function

Code: Select all

littlefs_create_partition_image(partition_name path_to_folder_containing_files)
I run into the error below.

Please note that I can compile littlefs programs with no issues if I do not try to create a partition using the cmake command.

I have also installed MinGW with make and gcc as described in the documentation of mklittlefs.

I would greatly appreciate any help that you can give me.

Have a great day! :D

ESP-IDF version 4.4
Target device: ESP32
[558/1009] cmd.exe /C "cd /D C:\Users\kc\eclipse-workspace\littlefs_try1\components\esp_littlefs\mklittlefs && make dist"
FAILED: ../components/esp_littlefs/mklittlefs/mklittlefs
cmd.exe /C "cd /D C:\Users\kc\eclipse-workspace\littlefs_try1\components\esp_littlefs\mklittlefs && make dist"
FIND: Parameter format not correct
'sed' is not recognized as an internal or external command,
operable program or batch file.
cc -std=gnu99 -Os -Wall -Itclap -Iinclude -Ilittlefs -I. -I ../src -D VERSION=\"0.2.3-40-ga14dabe\" -D LITTLEFS_VERSION=\"v2.4.1\" -D BUILD_CONFIG=\"\" -D BUILD_CONFIG_NAME=\"-generic\" -D __NO_INLINE__ -D LFS_NAME_MAX=32 -c -o ../src/littlefs/lfs.o ../src/littlefs/lfs.c
process_begin: CreateProcess(NULL, cc -std=gnu99 -Os -Wall -Itclap -Iinclude -Ilittlefs -I. -I ../src -D VERSION=\"0.2.3-40-ga14dabe\" -D LITTLEFS_VERSION=\"v2.4.1\" -D BUILD_CONFIG=\"\" -D BUILD_CONFIG_NAME=\"-generic\" -D __NO_INLINE__ -D LFS_NAME_MAX=32 -c -o ../src/littlefs/lfs.o ../src/littlefs/lfs.c, ...) failed.
make (e=2): The system cannot find the file specified.

make: *** [<builtin>: ../src/littlefs/lfs.o] Error 2

Re: Error when creating littlefs partition image using littlefs_create_partition_image

Posted: Sun Jul 10, 2022 7:44 am
by jeeper1974
I'm running into a similar issue. Did you ever get this working?
Roger

Re: Error when creating littlefs partition image using littlefs_create_partition_image

Posted: Mon Oct 03, 2022 9:42 am
by __len__
Hi,

I changed the C:\MinGW\bin\gcc.exe name to cc.exe,and it seems to work.

Re: Error when creating littlefs partition image using littlefs_create_partition_image

Posted: Mon Jun 05, 2023 8:17 am
by CKiamy
__len__ wrote:
Mon Oct 03, 2022 9:42 am
Hi,

I changed the C:\MinGW\bin\gcc.exe name to cc.exe,and it seems to work.
I have the same problem using the cmake command for littlefs. I would believe the problem rather has to do with the fact that the makefile is inside a git-submodule folder, and therefore cannot find the paths to the littlefs src folder, but I am not sure if it works this way...

Changing the name of the gcc executable seems like a rather "extreme" workaround imo. Have you, or anyone reading this, found another way to solve this problem?

Re: Error when creating littlefs partition image using littlefs_create_partition_image

Posted: Mon Jun 05, 2023 9:57 am
by CKiamy
CKiamy wrote:
Mon Jun 05, 2023 8:17 am
__len__ wrote:
Mon Oct 03, 2022 9:42 am
Hi,

I changed the C:\MinGW\bin\gcc.exe name to cc.exe,and it seems to work.
I have the same problem using the cmake command for littlefs. I would believe the problem rather has to do with the fact that the makefile is inside a git-submodule folder, and therefore cannot find the paths to the littlefs src folder, but I am not sure if it works this way...

Changing the name of the gcc executable seems like a rather "extreme" workaround imo. Have you, or anyone reading this, found another way to solve this problem?
Actually the problem has more to do with the fact that the makefile was intended to run on a POSIX system, which means it will not work for windows. There is a recent commit with an updated makefile that is supposed to work with windows:

https://github.com/BrianPugh/mklittlefs ... ix-windows

However this still does not work for me, in specific the line
  1.     FILES_TO_FORMAT := $(shell for /f "delims=" %%i in ('dir /s /b *.c *.cpp ^| findstr /v /i littlefs') do @echo %%i)
It still cannot find the source files.