mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
7d87f56e35
From: Arno Moonen <arno.moonen@airios.eu> Follows original message from Arno Moonen <arno.moonen@airios.eu> While integrating the ESP-IDF into our existing CMake structure, I've come across quite some hurdles. Most I've been able to fix in our CMake files, however this one I could not. Most of the targets created by the esptool_py component assume that the EXECUTABLE IDF build property (which contains the name of the CMake executable target) always equals the name of the created binary. This is however not always true. For instance, in our setup we use CMAKE_EXECUTABLE_SUFFIX_C and CMAKE_EXECUTABLE_SUFFIX_CXX in our toolchain file (both set to .elf). If we do add_executable(my_app), the target binary file would actually be my_app.elf. In order to fix this, I've updated it to use the TARGET_FILE generated expression. That way we also no longer need the EXECUTABLE_DIR IDF build property here. I've fixed this on v5.0.1 (as that's the ESP-IDF version I'm currently trying to integrate), but I assume it should be easy to apply the same fix to newer versions and the master branch as well. Note that this problem might exist in multiple places where EXECUTABLE is being used. While going through the ESP-IDF code base, I even noticed that a few places actually already seem to use the TARGET_FILE expression. To be honest the property name might be somewhat confusing as well, as it is actually the executable target. Closes https://github.com/espressif/esp-idf/pull/12558 |
||
---|---|---|
.. | ||
esptool | ||
CMakeLists.txt | ||
flasher_args.json.in | ||
get_port_args.cmake | ||
Kconfig.projbuild | ||
LICENSE | ||
project_include.cmake | ||
run_serial_tool.cmake | ||
sdkconfig.rename |