Think I've found it.
I'm using arduino-esp32 (1.0.2). It lists:
Code: Select all
set(COMPONENT_REQUIRES spi_flash mbedtls mdns ethernet)
Code: Select all
set(COMPONENT_REQUIRES spi_flash mbedtls mdns ethernet)
Thanks, this is it. Will see about updating Arduino in master (still requires Ethernet), and also about whether this error message can give some clues about which component(s) require the missing one.william.ferguson.au wrote: ↑Wed Jul 24, 2019 12:35 pmBuild directory deleted and/or renamed.
Think I've found it.
I'm using arduino-esp32 (1.0.2). It lists:Code: Select all
set(COMPONENT_REQUIRES spi_flash mbedtls mdns ethernet)
Code: Select all
get_filename_component(idf_project_name ${IDF_PROJECT_EXECUTABLE} NAME_WE)
set(app_bin "${CMAKE_BINARY_DIR}/${idf_project_name}.bin")
add_custom_command(OUTPUT /tmp/app.bin
DEPENDS "${app_bin}"
COMMAND "${CMAKE_COMMAND}" -E copy "${app_bin}" /tmp/app.bin
COMMENT "Copying ${app_bin} to /tmp/app.bin")
add_custom_target(copy_app_binary ALL DEPENDS /tmp/app.bin)
add_dependencies(copy_app_binary app)
Code: Select all
idf_build_get_property(build_dir BUILD_DIR)
idf_build_get_property(elf_name EXECUTABLE_NAME GENERATOR_EXPRESSION)
set(app_bin "${build_dir}/${elf_name}.bin")
add_custom_command(OUTPUT /tmp/app.bin
DEPENDS "${build_dir}/.bin_timestamp"
COMMAND "${CMAKE_COMMAND}" -E copy "${app_bin}" /tmp/app.bin
COMMENT "Copying binary to /tmp/app.bin")
add_custom_target(copy_app_binary ALL DEPENDS /tmp/app.bin)
add_dependencies(copy_app_binary gen_project_binary)
Code: Select all
if(IDF_VERSION_MAJOR EQUAL 4)
# V4 logic
else()
# V3.x logic
endif()
Oops, sorry. Updated post to use the .bin file instead.william.ferguson.au wrote: ↑Fri Aug 02, 2019 9:33 pmThanks Angus, I can get the command to execute, but I still can't get the correct build output file.
${IDF_PROJECT_EXECUTABLE} resolves to "my-project.elf" but I need "my-project.bin"
Is there another variable that I can/should use?
It's mentioned here, but in the context of integrating with an existing CMake build system:william.ferguson.au wrote: ↑Fri Aug 02, 2019 9:33 pmWhere can I find a description/definition of variables like IDF_PROJECT_EXECUTABLE?
Code: Select all
add_custom_command(
OUTPUT ${target_bin}
DEPENDS "${app_bin}"
COMMAND "${CMAKE_COMMAND}" -E copy "${app_bin}" "${target_bin}"
# NB I couldn't get comment to work, so I used an extra COMMAND to echo the value
COMMAND ${CMAKE_COMMAND} -E echo "Copying ${app_bin} to ${target_bin}"
)
Just a note - that link is currently dead (404), yet linked from the current stable docs.ESP_Angus wrote: ↑Tue Aug 06, 2019 1:20 amIt's mentioned here, but in the context of integrating with an existing CMake build system:
https://docs.espressif.com/projects/esp ... e-projects
Code: Select all
idf_build_get_property(build_dir BUILD_DIR)
set(lib_name "lslibs_source")
set(lib_file "lib${lib_name}.a")
set(lib_path "${build_dir}/esp-idf/${lib_name}")
set(out_path "${build_dir}/../../my_esp32_application_project/lslibs_include/lib")
add_custom_command(OUTPUT ${out_path}/${lib_file}
DEPENDS "${lib_path}/${lib_file}"
COMMAND "${CMAKE_COMMAND}" -E copy "${lib_path}/${lib_file}" "${out_path}/${lib_file}"
COMMENT "Copying binary to ${out_path}/${lib_file}")
add_custom_target(copy_app_binary ALL DEPENDS ${out_path}/${lib_file})
add_dependencies(copy_app_binary gen_project_binary)
Users browsing this forum: snutw_ and 135 guests