Using idf.cmake in a custom CMake project with multiple executables
Posted: Thu Oct 19, 2023 3:12 pm
In our company we are working on a mono-repo approach for our new platform products.
For these products some of them include an ESP32-S3 or an ESP32-C3.
The exact chip isn't that important, as for each architecture we'll need a different toolchain thus a different CMake configure step.
Within a single CMake project I want to define multiple executable targets and have these be build (all for the same MCU type/architecture).
It's unclear to me how I should use the CMake commands provided by including idf.cmake (as described in the documentation on using ESP-IDF in your own CMake project) when having multiple executables.
As these executables will be for different products, they will likely have different sdkconfigs, partition tables, etc.
The API of idf_build_process seems to be too limited or unclear to me.
Somehow it seems to assume that there's only one executable to build, which does not make sense to me.
Is there an example available where this is actually being used?
Or can someone point me in the right direction?
For these products some of them include an ESP32-S3 or an ESP32-C3.
The exact chip isn't that important, as for each architecture we'll need a different toolchain thus a different CMake configure step.
Within a single CMake project I want to define multiple executable targets and have these be build (all for the same MCU type/architecture).
It's unclear to me how I should use the CMake commands provided by including idf.cmake (as described in the documentation on using ESP-IDF in your own CMake project) when having multiple executables.
As these executables will be for different products, they will likely have different sdkconfigs, partition tables, etc.
The API of idf_build_process seems to be too limited or unclear to me.
Somehow it seems to assume that there's only one executable to build, which does not make sense to me.
Is there an example available where this is actually being used?
Or can someone point me in the right direction?