partition_table: do not always display partition table contents on build
This commit is contained in:
parent
52338e9cda
commit
acb7a211dd
3 changed files with 17 additions and 9 deletions
|
@ -5,7 +5,8 @@ if(BOOTLOADER_BUILD OR NOT CONFIG_APP_BUILD_BOOTLOADER)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_dependencies(bootloader partition_table)
|
add_dependencies(bootloader partition_table_bin)
|
||||||
|
|
||||||
# When secure boot is enabled, do not flash bootloader along with invocation of `idf.py flash`
|
# When secure boot is enabled, do not flash bootloader along with invocation of `idf.py flash`
|
||||||
if(NOT CONFIG_SECURE_BOOT)
|
if(NOT CONFIG_SECURE_BOOT)
|
||||||
set(flash_bootloader FLASH_IN_PROJECT)
|
set(flash_bootloader FLASH_IN_PROJECT)
|
||||||
|
|
|
@ -258,7 +258,7 @@ function(esptool_py_custom_target target_name flasher_filename dependencies)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if(NOT BOOTLOADER_BUILD)
|
if(NOT BOOTLOADER_BUILD)
|
||||||
set(flash_deps "partition_table")
|
set(flash_deps "partition_table_bin")
|
||||||
|
|
||||||
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
|
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
|
||||||
list(APPEND flash_deps "app")
|
list(APPEND flash_deps "app")
|
||||||
|
|
|
@ -37,19 +37,26 @@ set(gen_partition_table "${python}" "${CMAKE_CURRENT_SOURCE_DIR}/gen_esp32part.p
|
||||||
"--offset" "${PARTITION_TABLE_OFFSET}" "${md5_opt}" "${flashsize_opt}"
|
"--offset" "${PARTITION_TABLE_OFFSET}" "${md5_opt}" "${flashsize_opt}"
|
||||||
"${partition_secure_opt}" )
|
"${partition_secure_opt}" )
|
||||||
|
|
||||||
add_custom_command(OUTPUT "${build_dir}/partition_table/${unsigned_partition_bin}"
|
set(partition_table_display
|
||||||
COMMAND ${gen_partition_table} "${partition_csv}" "${build_dir}/partition_table/${unsigned_partition_bin}"
|
|
||||||
DEPENDS ${partition_csv} "${CMAKE_CURRENT_SOURCE_DIR}/gen_esp32part.py"
|
|
||||||
VERBATIM)
|
|
||||||
|
|
||||||
if(EXISTS ${partition_csv})
|
|
||||||
add_custom_target(partition_table ALL
|
|
||||||
DEPENDS "${build_dir}/partition_table/${unsigned_partition_bin}"
|
|
||||||
"${build_dir}/partition_table/${final_partition_bin}"
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Partition table binary generated. Contents:"
|
COMMAND ${CMAKE_COMMAND} -E echo "Partition table binary generated. Contents:"
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "*******************************************************************************"
|
COMMAND ${CMAKE_COMMAND} -E echo "*******************************************************************************"
|
||||||
COMMAND ${gen_partition_table} "${build_dir}/partition_table/${unsigned_partition_bin}"
|
COMMAND ${gen_partition_table} "${build_dir}/partition_table/${unsigned_partition_bin}"
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "*******************************************************************************"
|
COMMAND ${CMAKE_COMMAND} -E echo "*******************************************************************************"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT "${build_dir}/partition_table/${unsigned_partition_bin}"
|
||||||
|
COMMAND ${gen_partition_table} "${partition_csv}" "${build_dir}/partition_table/${unsigned_partition_bin}"
|
||||||
|
${partition_table_display}
|
||||||
|
DEPENDS ${partition_csv} "${CMAKE_CURRENT_SOURCE_DIR}/gen_esp32part.py"
|
||||||
|
VERBATIM)
|
||||||
|
|
||||||
|
add_custom_target(partition_table_bin DEPENDS "${build_dir}/partition_table/${unsigned_partition_bin}"
|
||||||
|
"${build_dir}/partition_table/${unsigned_partition_bin}")
|
||||||
|
|
||||||
|
if(EXISTS ${partition_csv})
|
||||||
|
add_custom_target(partition_table
|
||||||
|
DEPENDS partition_table_bin
|
||||||
|
${partition_table_display}
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
else()
|
else()
|
||||||
# If the partition input CSV is not found, create a phony partition_table target that
|
# If the partition input CSV is not found, create a phony partition_table target that
|
||||||
|
|
Loading…
Reference in a new issue