Preview release: CMake-based build system for ESP-IDF
Re: Preview release: CMake-based build system for ESP-IDF
Hi, thanks for reporting. We have the fix for the crash itself in review now, due to some changes in component ordering between the build systems it only happens in CMake...
Re: Preview release: CMake-based build system for ESP-IDF
Hi. Thanks for the confirmation. Approx. when can we expect the fix to be available in mainline?
Re: Preview release: CMake-based build system for ESP-IDF
It's been a bit slow this week because of China's national holiday, but I'd expect the linker fix will be merged early next week.Oleg Endo wrote:Hi. Thanks for the confirmation. Approx. when can we expect the fix to be available in mainline?
Moderator's note, the ongoing discussion about cross-platform CMake has been moved here: https://esp32.com/viewtopic.php?f=13&t=7535&p=31759
Re: Preview release: CMake-based build system for ESP-IDF
Hi,
I can confirm that the cmake build is now working with the latest ESP-IDF master.
Thanks everyone!
Cheers,
Oleg
I can confirm that the cmake build is now working with the latest ESP-IDF master.
Thanks everyone!
Cheers,
Oleg
Re: Preview release: CMake-based build system for ESP-IDF
Anyone successfully used the COMPONENTS variable to trim down the number of included components in a project, as per the docs?
Starting with the hello_world example (latest master as of today), changing the top-level CMakeLists.txt to this
results in this:
but that still leaves me with this:
The reason I'm even trying to reduce the number of components is because of all the different target generated by CMake. In CLion, these are all listed in the project window and debug/run targets, and it gets quite long; this is only about half of them. Having to navigate them all is a bit of a pain since I have no actual interest in them other than as libraries. Even with the minimum set of components, the list is nearly as long as in the image. The poor hello_world gets lost among them all.
Starting with the hello_world example (latest master as of today), changing the top-level CMakeLists.txt to this
Code: Select all
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(COMPONENTS cxx)
project(hello-world)
Ok, so I add the bootloader component:CMake Error at /home/permal/esp/esp-idf/components/partition_table/CMakeLists.txt:61 (add_dependencies):
Cannot add target-level dependencies to non-existent target "bootloader".
The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.
CMake Error at /home/permal/esp/esp-idf/components/partition_table/CMakeLists.txt:62 (add_dependencies):
Cannot add target-level dependencies to non-existent target "app".
The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.
Code: Select all
set(COMPONENTS cxx bootloader)
Am I using this wrong? It seems the minim one must include is this, anything less and it breaks.CMake Error at /home/permal/esp/esp-idf/components/partition_table/CMakeLists.txt:62 (add_dependencies):
Cannot add target-level dependencies to non-existent target "app".
The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.
Code: Select all
set(COMPONENTS bootloader esptool_py )
Re: Preview release: CMake-based build system for ESP-IDF
Today, I tried to use that function and after a while I managed to build a binary with a minimal subset of IDF components. I've used this code snippet in my CMakeLists.txt file placed in the root folder in my project. Before compiling the project I deleted the sdkconfig file.permal wrote: ↑Tue Oct 09, 2018 8:14 pmAnyone successfully used the COMPONENTS variable to trim down the number of included components in a project, as per the docs?
Starting with the hello_world example (latest master as of today), changing the top-level CMakeLists.txt to this
results in this:Code: Select all
cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(COMPONENTS cxx) project(hello-world)
Ok, so I add the bootloader component:CMake Error at /home/permal/esp/esp-idf/components/partition_table/CMakeLists.txt:61 (add_dependencies):
Cannot add target-level dependencies to non-existent target "bootloader".
The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.
CMake Error at /home/permal/esp/esp-idf/components/partition_table/CMakeLists.txt:62 (add_dependencies):
Cannot add target-level dependencies to non-existent target "app".
The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.but that still leaves me with this:Code: Select all
set(COMPONENTS cxx bootloader)
Am I using this wrong? It seems the minim one must include is this, anything less and it breaks.CMake Error at /home/permal/esp/esp-idf/components/partition_table/CMakeLists.txt:62 (add_dependencies):
Cannot add target-level dependencies to non-existent target "app".
The add_dependencies works for top-level logical targets created by the
add_executable, add_library, or add_custom_target commands. If you want to
add file-level dependencies see the DEPENDS option of the add_custom_target
and add_custom_command commands.The reason I'm even trying to reduce the number of components is because of all the different target generated by CMake. In CLion, these are all listed in the project window and debug/run targets, and it gets quite long; this is only about half of them. Having to navigate them all is a bit of a pain since I have no actual interest in them other than as libraries. Even with the minimum set of components, the list is nearly as long as in the image. The poor hello_world gets lost among them all.Code: Select all
set(COMPONENTS bootloader esptool_py )
Screenshot from 2018-10-09 22-06-48.png
Code: Select all
set(COMPONENTS cxx app bootloader esptool_py main)
Who is online
Users browsing this forum: uC_Jon and 155 guests