2019-03-24 02:14:49 +00:00
|
|
|
set(COMPONENT_PRIV_REQUIRES bootloader)
|
|
|
|
register_component()
|
2018-02-01 09:45:41 +00:00
|
|
|
|
2018-10-19 19:02:55 +00:00
|
|
|
string(REPLACE ";" " " ESPTOOLPY_FLASH_PROJECT_OPTIONS "${ESPTOOLPY_ELF2IMAGE_FLASH_OPTIONS}")
|
|
|
|
set(ESPTOOLPY_FLASH_PROJECT_OPTIONS
|
2019-01-22 03:45:45 +00:00
|
|
|
"${ESPTOOLPY_FLASH_PROJECT_OPTIONS}"
|
2018-10-19 19:02:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(CONFIG_SECURE_BOOT_ENABLED)
|
|
|
|
set(ESPTOOLPY_FLASH_PROJECT_OPTIONS "")
|
|
|
|
endif()
|
|
|
|
|
2019-01-22 03:45:45 +00:00
|
|
|
# Generate the flash project args and the flasher args json file using the accumulated values
|
|
|
|
# from esptool_py_flash_project_args calls. The file is first configured using configure_file() for all variable values,
|
|
|
|
# and then generated using file(GENERATE... for generator expressions.
|
2019-05-10 02:53:08 +00:00
|
|
|
configure_file(${COMPONENT_DIR}/flash_project_args.in
|
2019-01-22 03:45:45 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/flash_project_args.in)
|
2018-11-11 07:36:10 +00:00
|
|
|
|
2019-05-10 02:53:08 +00:00
|
|
|
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/flash_project_args.in2
|
2019-01-22 03:45:45 +00:00
|
|
|
INPUT ${CMAKE_CURRENT_BINARY_DIR}/flash_project_args.in)
|
2019-05-10 02:53:08 +00:00
|
|
|
file(GENERATE OUTPUT ${CMAKE_BINARY_DIR}/flash_project_args
|
|
|
|
INPUT ${CMAKE_CURRENT_BINARY_DIR}/flash_project_args.in2)
|
2019-01-22 03:45:45 +00:00
|
|
|
|
2019-05-10 02:53:08 +00:00
|
|
|
configure_file(${COMPONENT_DIR}/flasher_args.json.in
|
2019-01-22 03:45:45 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in)
|
2018-04-05 07:13:53 +00:00
|
|
|
|
2019-05-10 02:53:08 +00:00
|
|
|
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in2
|
2019-01-22 03:45:45 +00:00
|
|
|
INPUT ${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in)
|
2019-05-10 02:53:08 +00:00
|
|
|
file(GENERATE OUTPUT ${CMAKE_BINARY_DIR}/flasher_args.json
|
|
|
|
INPUT ${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in2)
|
|
|
|
|
|
|
|
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/flash_project_args.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/flash_project_args.in2"
|
|
|
|
"${CMAKE_BINARY_DIR}/flash_project_args"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/flasher_args.json.in2"
|
|
|
|
"${CMAKE_BINARY_DIR}/flasher_args.json")
|