2019-05-10 07:25:25 +00:00
|
|
|
idf_component_register(PRIV_REQUIRES partition_table)
|
2019-05-10 02:53:08 +00:00
|
|
|
|
2019-01-22 03:45:45 +00:00
|
|
|
# Do not generate flash file when building bootloader or is in early expansion of the build
|
2019-07-22 14:04:03 +00:00
|
|
|
if(BOOTLOADER_BUILD OR NOT CONFIG_APP_BUILD_BOOTLOADER)
|
2019-01-22 03:45:45 +00:00
|
|
|
return()
|
|
|
|
endif()
|
2018-01-12 02:49:13 +00:00
|
|
|
|
2019-12-20 01:55:02 +00:00
|
|
|
add_dependencies(bootloader partition_table)
|
2019-06-14 04:53:46 +00:00
|
|
|
|
|
|
|
esptool_py_custom_target(bootloader-flash bootloader "bootloader")
|
2019-12-20 01:55:02 +00:00
|
|
|
esptool_py_flash_target_image(bootloader-flash bootloader "0x1000" "${BOOTLOADER_BUILD_DIR}/bootloader.bin")
|
|
|
|
|
|
|
|
# Also attach an image to the project flash target
|
|
|
|
if(NOT CONFIG_SECURE_BOOT_ENABLED)
|
|
|
|
esptool_py_flash_target_image(flash bootloader "0x1000" "${BOOTLOADER_BUILD_DIR}/bootloader.bin")
|
|
|
|
endif()
|