mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
Merge branch 'bugfix/cmake_failure_on_spiffsgen_clean_project' into 'master'
spiffs: fix build issue on clean project See merge request espressif/esp-idf!6596
This commit is contained in:
@@ -15,6 +15,7 @@ function(spiffs_create_partition_image partition base_dir)
|
|||||||
partition_table_get_partition_info(size "--partition-name ${partition}" "size")
|
partition_table_get_partition_info(size "--partition-name ${partition}" "size")
|
||||||
partition_table_get_partition_info(offset "--partition-name ${partition}" "offset")
|
partition_table_get_partition_info(offset "--partition-name ${partition}" "offset")
|
||||||
|
|
||||||
|
if("${size}" AND "${offset}")
|
||||||
set(image_file ${CMAKE_BINARY_DIR}/${partition}.bin)
|
set(image_file ${CMAKE_BINARY_DIR}/${partition}.bin)
|
||||||
|
|
||||||
if(CONFIG_SPIFFS_USE_MAGIC)
|
if(CONFIG_SPIFFS_USE_MAGIC)
|
||||||
@@ -47,8 +48,13 @@ function(spiffs_create_partition_image partition base_dir)
|
|||||||
${image_file})
|
${image_file})
|
||||||
|
|
||||||
if(arg_FLASH_IN_PROJECT)
|
if(arg_FLASH_IN_PROJECT)
|
||||||
esptool_py_flash_project_args(${partition} ${offset} ${image_file} FLASH_IN_PROJECT)
|
esptool_py_flash_project_args("${partition}" "${offset}" "${image_file}" FLASH_IN_PROJECT)
|
||||||
else()
|
else()
|
||||||
esptool_py_flash_project_args(${partition} ${offset} ${image_file})
|
esptool_py_flash_project_args("${partition}" "${offset}" "${image_file}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(message "Failed to create SPIFFS image for partition '${partition}'. "
|
||||||
|
"Check project configuration if using the correct partition table file.")
|
||||||
|
fail_at_build_time(spiffs_${partition}_bin "${message}")
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
Reference in New Issue
Block a user