From d0c817a0f777c17c77f29c05a2d6d0f94beb9214 Mon Sep 17 00:00:00 2001 From: Brian Pugh Date: Fri, 5 Jul 2024 08:39:41 -0400 Subject: [PATCH] Revert "support littlefs-python 0.11.0 CLI in a backwards compatible way." This reverts commit 84189689a650185c53dd4f16ea55f9729c2f2a07. --- project_include.cmake | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/project_include.cmake b/project_include.cmake index 74e7877..a87aefc 100644 --- a/project_include.cmake +++ b/project_include.cmake @@ -44,32 +44,13 @@ function(littlefs_create_partition_image partition base_dir) ) endif() - file(WRITE ${CMAKE_BINARY_DIR}/parse_littlefs_version.cmake " -file(READ \${INPUT_FILE} littlefs_version_output) -string(REGEX MATCH \"[0-9]+\\\\.[0-9]+\" littlefs_version_number \"\${littlefs_version_output}\") -string(REPLACE \".\" \";\" version_list \${littlefs_version_number}) -list(GET version_list 0 major_version) -list(GET version_list 1 minor_version) -if(\${major_version} EQUAL 0 AND \${minor_version} LESS 11) - set(create_fs_command \"${littlefs_py} create ${base_dir_full_path} --image=${image_file} -v --fs-size=${size} --name-max=${CONFIG_LITTLEFS_OBJ_NAME_LEN} --block-size=4096\") -else() - set(create_fs_command \"${littlefs_py} create ${base_dir_full_path} ${image_file} -v --fs-size=${size} --name-max=${CONFIG_LITTLEFS_OBJ_NAME_LEN} --block-size=4096\") -endif() -file(WRITE ${CMAKE_BINARY_DIR}/create_fs_command.txt \"\${create_fs_command}\") -") - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/create_fs_command.txt - COMMAND ${littlefs_py} --version > ${CMAKE_BINARY_DIR}/littlefs_version.txt - COMMAND ${CMAKE_COMMAND} -DINPUT_FILE=${CMAKE_BINARY_DIR}/littlefs_version.txt -P ${CMAKE_BINARY_DIR}/parse_littlefs_version.cmake - DEPENDS ${littlefs_py_venv} - ) # Execute LittleFS image generation; this always executes as there is no way to specify for CMake to watch for # contents of the base dir changing. add_custom_target(littlefs_${partition}_bin ALL - COMMAND ${create_fs_command} - DEPENDS ${arg_DEPENDS} ${littlefs_py_venv} ${CMAKE_BINARY_DIR}/create_fs_command.txt - ) + COMMAND ${littlefs_py} create ${base_dir_full_path} -v --image=${image_file} --fs-size=${size} --name-max=${CONFIG_LITTLEFS_OBJ_NAME_LEN} --block-size=4096 + DEPENDS ${arg_DEPENDS} ${littlefs_py_venv} + ) set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES