esptool: don't generate flashing metadata in loadable elf build

This commit is contained in:
Ivan Grokhotkov
2020-05-04 19:11:00 +02:00
parent 5e95bc1d21
commit dafd50934d
2 changed files with 15 additions and 12 deletions

View File

@@ -34,6 +34,7 @@ if(NOT BOOTLOADER_BUILD)
set(ESPTOOLPY_AFTER "no_reset") set(ESPTOOLPY_AFTER "no_reset")
endif() endif()
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
file(READ "flasher_args.json.in" flasher_args_content) file(READ "flasher_args.json.in" flasher_args_content)
string(CONFIGURE "${flasher_args_content}" flasher_args_content) string(CONFIGURE "${flasher_args_content}" flasher_args_content)
@@ -42,4 +43,5 @@ if(NOT BOOTLOADER_BUILD)
file_generate("${CMAKE_BINARY_DIR}/flasher_args.json" file_generate("${CMAKE_BINARY_DIR}/flasher_args.json"
INPUT "${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in") INPUT "${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in")
endif() endif()
endif()

View File

@@ -97,9 +97,10 @@ endif()
idf_component_get_property(main_args esptool_py FLASH_ARGS) idf_component_get_property(main_args esptool_py FLASH_ARGS)
idf_component_get_property(sub_args esptool_py FLASH_SUB_ARGS) idf_component_get_property(sub_args esptool_py FLASH_SUB_ARGS)
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
esptool_py_flash_target(partition_table-flash "${main_args}" "${sub_args}") esptool_py_flash_target(partition_table-flash "${main_args}" "${sub_args}")
esptool_py_flash_target_image(partition_table-flash partition_table "${PARTITION_TABLE_OFFSET}" esptool_py_flash_target_image(partition_table-flash partition_table "${PARTITION_TABLE_OFFSET}"
"${build_dir}/partition_table/partition-table.bin") "${build_dir}/partition_table/partition-table.bin")
esptool_py_flash_target_image(flash partition_table "${PARTITION_TABLE_OFFSET}" esptool_py_flash_target_image(flash partition_table "${PARTITION_TABLE_OFFSET}"
"${build_dir}/partition_table/partition-table.bin") "${build_dir}/partition_table/partition-table.bin")
endif()