Error when creating littlefs partition image using littlefs_create_partition_image

lukecam95
Posts: 14
Joined: Thu Sep 23, 2021 9:37 am

Error when creating littlefs partition image using littlefs_create_partition_image

Postby lukecam95 » Wed Mar 09, 2022 4:55 pm

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
Attachments
CMakeOutput.log
(70.3 KiB) Downloaded 405 times
console log.txt
(2.1 MiB) Downloaded 397 times

jeeper1974
Posts: 11
Joined: Thu Aug 13, 2020 5:47 am

Re: Error when creating littlefs partition image using littlefs_create_partition_image

Postby jeeper1974 » Sun Jul 10, 2022 7:44 am

I'm running into a similar issue. Did you ever get this working?
Roger

__len__
Posts: 1
Joined: Mon Sep 05, 2022 5:49 am

Re: Error when creating littlefs partition image using littlefs_create_partition_image

Postby __len__ » 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.

CKiamy
Posts: 19
Joined: Wed Nov 23, 2022 3:01 pm

Re: Error when creating littlefs partition image using littlefs_create_partition_image

Postby CKiamy » 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?

CKiamy
Posts: 19
Joined: Wed Nov 23, 2022 3:01 pm

Re: Error when creating littlefs partition image using littlefs_create_partition_image

Postby CKiamy » Mon Jun 05, 2023 9:57 am

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.

Who is online

Users browsing this forum: No registered users and 187 guests