Merge branch 'bugfix/elf_dir' into 'master'

cmake: add elf dir information

See merge request espressif/esp-idf!8264
This commit is contained in:
Angus Gratton
2020-04-08 12:41:23 +08:00
3 changed files with 7 additions and 2 deletions

View File

@@ -49,6 +49,7 @@ idf_build_get_property(build_dir BUILD_DIR)
idf_build_get_property(elf_name EXECUTABLE_NAME GENERATOR_EXPRESSION)
idf_build_get_property(elf EXECUTABLE GENERATOR_EXPRESSION)
idf_build_get_property(elf_dir EXECUTABLE_DIR GENERATOR_EXPRESSION)
if(CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES AND NOT BOOTLOADER_BUILD)
set(unsigned_project_binary "${elf_name}-unsigned.bin")
@@ -64,7 +65,7 @@ set(PROJECT_BIN "${elf_name}.bin")
if(CONFIG_APP_BUILD_GENERATE_BINARIES)
add_custom_command(OUTPUT "${build_dir}/.bin_timestamp"
COMMAND ${ESPTOOLPY} elf2image ${ESPTOOLPY_FLASH_OPTIONS} ${esptool_elf2image_args}
-o "${build_dir}/${unsigned_project_binary}" "${elf}"
-o "${build_dir}/${unsigned_project_binary}" "${elf_dir}/${elf}"
COMMAND ${CMAKE_COMMAND} -E echo "Generated ${build_dir}/${unsigned_project_binary}"
COMMAND ${CMAKE_COMMAND} -E md5sum "${build_dir}/${unsigned_project_binary}" > "${build_dir}/.bin_timestamp"
DEPENDS ${elf}
@@ -136,7 +137,7 @@ add_custom_target(monitor
COMMAND ${CMAKE_COMMAND}
-D IDF_PATH="${idf_path}"
-D IDF_MONITOR="${idf_path}/tools/idf_monitor.py"
-D ELF_FILE="${elf}"
-D ELF_FILE="${elf_dir}/${elf}"
-D WORKING_DIRECTORY="${build_dir}"
-P run_idf_monitor.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}