mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
fix(littlefs): Allow LittleFS image generation on Windows + version bump
Closes https://github.com/espressif/esp-idf/issues/12900
This commit is contained in:
parent
240dd4fb8d
commit
cd217a3586
@ -4,8 +4,4 @@ idf_component_register(SRCS "esp_littlefs_example.c"
|
|||||||
|
|
||||||
# Note: you must have a partition named the first argument (here it's "littlefs")
|
# Note: you must have a partition named the first argument (here it's "littlefs")
|
||||||
# in your partition table csv file.
|
# in your partition table csv file.
|
||||||
if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
littlefs_create_partition_image(storage ../flash_data FLASH_IN_PROJECT)
|
||||||
littlefs_create_partition_image(storage ../flash_data FLASH_IN_PROJECT)
|
|
||||||
else()
|
|
||||||
fail_at_build_time(littlefs "Windows does not support LittleFS partition generation")
|
|
||||||
endif()
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2023 Brian Pugh
|
* SPDX-FileCopyrightText: 2023 Brian Pugh
|
||||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
*/
|
*/
|
||||||
@ -85,11 +85,11 @@ void app_main(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char line[128];
|
char line[128] = {0};
|
||||||
fgets(line, sizeof(line), f);
|
fgets(line, sizeof(line), f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
// strip newline
|
// strip newline
|
||||||
char*pos = strchr(line, '\n');
|
char* pos = strpbrk(line, "\r\n");
|
||||||
if (pos) {
|
if (pos) {
|
||||||
*pos = '\0';
|
*pos = '\0';
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ void app_main(void)
|
|||||||
fgets(line, sizeof(line), f);
|
fgets(line, sizeof(line), f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
// strip newline
|
// strip newline
|
||||||
pos = strchr(line, '\n');
|
pos = strpbrk(line, "\r\n");
|
||||||
if (pos) {
|
if (pos) {
|
||||||
*pos = '\0';
|
*pos = '\0';
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
## IDF Component Manager Manifest File
|
## IDF Component Manager Manifest File
|
||||||
dependencies:
|
dependencies:
|
||||||
joltwallet/littlefs: "~=1.14.4"
|
joltwallet/littlefs: "~=1.14.8"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user