2024-11-29 01:57 PM
I am using CubeMX 6.13 to generate a project. Because I want the project to be build with CMake, under Project Manager I have selected "Toolchain / IDE = Cmake".
The generated project can be compiled with cmake from command line.
Then I open the project in CubeIDE with "File->Open Projects from File System"
I also tried "Import... -> Existing Projects into Workspace"
The Build button is grayed out and when I go to "Project->Properties" there is no "C/C++ Build" entry on the left, where one could configure the CMake Settings.
When I create a new "STM32 CMake Project" via CubeIDE everything works as expected.
There is a very similar post here but the only answer is from the post creator basically saying: look at AN5952 but I don't find that helpful or applicable.
What am I missing?
2024-11-29 02:20 PM
> Because I want the project to be build with CMake
If you actually want to build with CubeIDE, select CubeIDE when generating the project. Simple, eh?
Maybe one day Eclipse CDT will support CMake natively but this has not happened yet.
2024-11-29 02:58 PM
Thanks for your reply but I don't think it is "simple" as it is very much possible to compile CMake projects with CubeIDE when they were created by CubeIDE, so obviously it must be possible.
I chose cmake for automated builds on a build server, but I would like to be able to use CubeIDE to build and debug.
2024-11-29 04:31 PM
Yes it looks like CubeIDE, per AN5952, generates CMake projects differently than CubeMX does. And CubeIDE can open by "Open projects from filesystem" only projects that it created. CubeMX does not create the extra stuff needed for Eclipse (.project and .cproject)