mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
partition_table: output partition table info for partition_table target
This commit is contained in:
parent
9f024df9e5
commit
2aba19e00d
@ -33,15 +33,24 @@ endif()
|
||||
idf_build_get_property(build_dir BUILD_DIR)
|
||||
idf_build_get_property(python PYTHON)
|
||||
|
||||
set(gen_partition_table "${python}" "${CMAKE_CURRENT_SOURCE_DIR}/gen_esp32part.py" "-q"
|
||||
"--offset" "${PARTITION_TABLE_OFFSET}" "${md5_opt}" "${flashsize_opt}"
|
||||
"${partition_secure_opt}" )
|
||||
|
||||
add_custom_command(OUTPUT "${build_dir}/partition_table/${unsigned_partition_bin}"
|
||||
COMMAND "${python}" "${CMAKE_CURRENT_SOURCE_DIR}/gen_esp32part.py"
|
||||
-q --offset ${PARTITION_TABLE_OFFSET} ${md5_opt} ${flashsize_opt}
|
||||
${partition_secure_opt} ${partition_csv} ${build_dir}/partition_table/${unsigned_partition_bin}
|
||||
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/${final_partition_bin}")
|
||||
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 "*******************************************************************************"
|
||||
COMMAND ${gen_partition_table} "${build_dir}/partition_table/${unsigned_partition_bin}"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "*******************************************************************************"
|
||||
VERBATIM)
|
||||
else()
|
||||
# If the partition input CSV is not found, create a phony partition_table target that
|
||||
# fails the build. fail_at_build_time also touches CMakeCache.txt to cause a cmake run next time
|
||||
@ -68,7 +77,7 @@ if(CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME)
|
||||
add_custom_command(TARGET partition_table POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E echo
|
||||
"Partition table built but not signed. Sign partition data before flashing:"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo
|
||||
COMMAND ${CMAKE_COMMAND} -E echo
|
||||
"\t${espsecurepy} sign_data --keyfile KEYFILE ${build_dir}/partition_table/${final_partition_bin}"
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user