esp_littlefs icon indicating copy to clipboard operation
esp_littlefs copied to clipboard

littlefs_create_partition_image() in VSCode CMakeList.txt fails

Open jeeper1974 opened this issue 1 year ago • 4 comments

I was able to get mklittlefs added to esp-idf 4.4 components and everything builds fine. When I add littlefs_create_partition_image() to CMakeLists.txt it fails. I can build the SPIFFS partition with spiffs_create_partition_image() without issue as shown here. Littlefs_create_partition_image() fails.

#spiffs_create_partition_image(storage ../spiffsImage FLASH_IN_PROJECT)
set(MKLITTLEFS "C:/Users/roger/esp4.4B/esp-idf/components/esp_littlefs/mklittlefs/mklittlefs")
littlefs_create_partition_image(storage ../spiffsImage)`
`[2/6] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Users\roger\source\repos\stb-r1\build\bootloader\esp-idf\esptool_py && C:\Users\roger\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Users/roger/esp4.4B/esp-idf/components/partition_table/check_sizes.py --offset 0x9000 bootloader 0x1000 C:/Users/roger/source/repos/stb-r1/build/bootloader/bootloader.bin"
Bootloader binary size 0x7ec0 bytes. 0x140 bytes (1%) free.
[3/4] Generating C:/Users/roger/esp4.4B/esp-idf/components/esp_littlefs/mklittlefs/mklittlefs
make: Nothing to be done for 'dist'.
[4/4] cmd.exe /C "cd /D C:\Users\roger\source\repos\stb-r1\build\esp-idf\main && C:\Users\roger\...b-r1/spiffsImage -s 0xf0000 -p 256 -b 4096 C:/Users/roger/source/repos/stb-r1/build/storage.bin" 
FAILED: esp-idf/main/CMakeFiles/littlefs_storage_bin
cmd.exe /C "cd /D C:\Users\roger\source\repos\stb-r1\build\esp-idf\main && C:\Users\roger\esp4.4B\esp-idf\components\esp_littlefs\mklittlefs\mklittlefs -d 0 -c C:/Users/roger/source/repos/stb-r1/spiffsImage -s 0xf0000 -p 256 -b 4096 C:/Users/roger/source/repos/stb-r1/build/storage.bin"
ninja: build stopped: subcommand failed.

jeeper1974 avatar Jul 11 '22 15:07 jeeper1974

Hi @jeeper1974 ! Odd to see it failing; is there any additional information outputted?

BrianPugh avatar Jul 14 '22 21:07 BrianPugh

That is all it outputs. I've got a folder named "spiffsImage" that is one directory above the "main" project so I set inCMakeLists.txt:

littlefs_create_partition_image(storage ../spiffsImage)`

My partition table looks like this:

nvs,data,nvs,,0x6000
phy_init,data,phy,,0x1000
factory,0,0,,2M
storage,data,spiffs,,1M

But when I compile it only fails with:

[1/8] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Users\roger\source\repos\stb-r1\build\bootloader\esp-idf\esptool_py && C:\Users\roger\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Users/roger/esp4.4B/esp-idf/components/partition_table/check_sizes.py --offset 0x9000 bootloader 0x1000 C:/Users/roger/source/repos/stb-r1/build/bootloader/bootloader.bin"
Bootloader binary size 0x7ec0 bytes. 0x140 bytes (1%) free.
[2/6] Generating C:/Users/roger/esp4.4B/esp-idf/components/esp_littlefs/mklittlefs/mklittlefs
FIND: Parameter format not correct
make: Nothing to be done for 'dist'.
[3/6] cmd.exe /C "cd /D C:\Users\roger\source\repos\stb-r1\build\esp-idf\main && C:\Users\roger\esp4.4B\esp-idf\comp...ger/source/repos/stb-r1/spiffsImage -s 0x100000 -p 256 -b 4096 C:/Users/roger/source/repos/stb-r1/build/storage.bin"
FAILED: esp-idf/main/CMakeFiles/littlefs_storage_bin
cmd.exe /C "cd /D C:\Users\roger\source\repos\stb-r1\build\esp-idf\main && C:\Users\roger\esp4.4B\esp-idf\components\esp_littlefs\mklittlefs\mklittlefs -d 0 -c C:/Users/roger/source/repos/stb-r1/spiffsImage -s 0x100000 -p 256 -b 4096 C:/Users/roger/source/repos/stb-r1/build/storage.bin"
[4/6] Linking CXX executable stb_fw.elf
ninja: build stopped: subcommand failed.

I ended up just switching back to SPIFFS which is working fine. If you have any suggestions I can try out, let me know and I'll give littlefs a go again. Thanks

jeeper1974 avatar Jul 15 '22 06:07 jeeper1974

I'm willing to bet this line is causing the issue, but not quite sure what actions to take. I can maybe try investigating this weekend, but I might be a bit slow to get around to this.

BrianPugh avatar Jul 18 '22 16:07 BrianPugh

No rush. Like I mentioned I switched back to SPIFF and it is running fine. I don't know if I could get some more speed from using LittleFS, but that was the experiment. You think it is that line because it is linux commands and I'm running it in windows? It looks like the makefile did run and mklittlefs was able to compile and create mklittlefs.exe; C:\Users\roger\esp4.4B\esp-idf\components\esp_littlefs\mklittlefs>mklittlefs --version mklittlefs version: 0.2.3-40-ga14dabe

I'm not familiar with the command structure to see if it can build the littlefs system from the command line, but could try if that would provide a clue on the reason it fails.

jeeper1974 avatar Jul 18 '22 19:07 jeeper1974

Sorry. I switched back to SPIFF and have not tried again.

Roger

From: Mr-Techtron @.> Sent: Saturday, February 18, 2023 2:21 AM To: joltwallet/esp_littlefs @.> Cc: jeeper1974 @.>; Mention @.> Subject: Re: [joltwallet/esp_littlefs] littlefs_create_partition_image() in VSCode CMakeList.txt fails (Issue #83)

any update on this? I am getting the same error on my Windows 11, using eclipse as an IDE.

— Reply to this email directly, view it on GitHub https://github.com/joltwallet/esp_littlefs/issues/83#issuecomment-1435617847 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ATX4PGCG66EXBBSWSZ6VSJDWYCPAFANCNFSM53H26ADQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ATX4PGCR2O3XMRICTVAMFFTWYCPAFA5CNFSM53H26AD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOKWI4UNY.gif Message ID: @.*** @.***> >

jeeper1974 avatar Feb 19 '23 06:02 jeeper1974

@jeeper1974 Hello jeeper, just wanted to let you know that I managed to compile the project in windows 11. I followed the workaround mentioned in #102 . For gcc and make, I used MSYS2.

Mr-Techtron avatar Feb 19 '23 08:02 Mr-Techtron

closing this issue in favor of #102 . I'll be attempting to integrate some fixes now.

BrianPugh avatar May 03 '23 15:05 BrianPugh