cmake: Fix flasher argument generation

This commit is contained in:
Angus Gratton
2018-08-20 10:47:42 +10:00
committed by Angus Gratton
parent d376105e8e
commit 885df4c90f

View File

@ -25,12 +25,14 @@ endif()
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PARTITION_CSV_PATH}) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${PARTITION_CSV_PATH})
# Parse the partition table to get variable partition offsets & sizes which must be known at CMake runtime # Parse the partition table to get variable partition offsets & sizes which must be known at CMake runtime
macro(get_partition_info variable get_part_info_args) function(get_partition_info variable get_part_info_args)
separate_arguments(get_part_info_args)
execute_process(COMMAND execute_process(COMMAND
get_part_info ${COMPONENT_PATH}/parttool.py -q ${get_part_info_args} ${PARTITION_CSV_PATH} ${COMPONENT_PATH}/parttool.py -q ${get_part_info_args} ${PARTITION_CSV_PATH}
OUTPUT_VARIABLE ${variable} OUTPUT_VARIABLE result
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
endmacro() set(${variable} ${result} PARENT_SCOPE)
endfunction()
if(CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION) if(CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION)
get_partition_info(PHY_PARTITION_OFFSET "--type data --subtype phy --offset") get_partition_info(PHY_PARTITION_OFFSET "--type data --subtype phy --offset")