esptool_py: retain flash targets when building RAM loadable apps
This commit is contained in:
parent
7ddd39ec7d
commit
fd74ec75d7
2 changed files with 19 additions and 7 deletions
|
@ -1,13 +1,15 @@
|
||||||
idf_component_register(REQUIRES bootloader)
|
idf_component_register(REQUIRES bootloader)
|
||||||
|
|
||||||
if(NOT BOOTLOADER_BUILD AND CONFIG_APP_BUILD_GENERATE_BINARIES)
|
if(NOT BOOTLOADER_BUILD)
|
||||||
idf_build_get_property(build_dir BUILD_DIR)
|
idf_build_get_property(build_dir BUILD_DIR)
|
||||||
|
|
||||||
|
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
|
||||||
partition_table_get_partition_info(app_partition_offset "--partition-boot-default" "offset")
|
partition_table_get_partition_info(app_partition_offset "--partition-boot-default" "offset")
|
||||||
esptool_py_custom_target(app-flash app "app")
|
esptool_py_custom_target(app-flash app "app")
|
||||||
|
|
||||||
esptool_py_flash_target_image(app-flash app "${app_partition_offset}" "${build_dir}/${PROJECT_BIN}")
|
esptool_py_flash_target_image(app-flash app "${app_partition_offset}" "${build_dir}/${PROJECT_BIN}")
|
||||||
esptool_py_flash_target_image(flash app "${app_partition_offset}" "${build_dir}/${PROJECT_BIN}")
|
esptool_py_flash_target_image(flash app "${app_partition_offset}" "${build_dir}/${PROJECT_BIN}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# If anti-rollback option is set then factory partition should not be in Partition Table.
|
# If anti-rollback option is set then factory partition should not be in Partition Table.
|
||||||
# In this case, should be used the partition table with two ota app without the factory.
|
# In this case, should be used the partition table with two ota app without the factory.
|
||||||
|
|
|
@ -231,6 +231,16 @@ function(esptool_py_custom_target target_name flasher_filename dependencies)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
if(NOT BOOTLOADER_BUILD AND CONFIG_APP_BUILD_GENERATE_BINARIES)
|
if(NOT BOOTLOADER_BUILD)
|
||||||
esptool_py_custom_target(flash project "app;bootloader;partition_table")
|
set(flash_deps "partition_table")
|
||||||
|
|
||||||
|
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
|
||||||
|
list(APPEND flash_deps "app")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_APP_BUILD_BOOTLOADER)
|
||||||
|
list(APPEND flash_deps "bootloader")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
esptool_py_custom_target(flash project "${flash_deps}")
|
||||||
endif()
|
endif()
|
Loading…
Reference in a new issue