STM32CubeIDE CMake integration
Since it took a tremendous amount of effort in getting CMake working within STM32CubeIDE, I'd thought I'd share a method of getting it done. I've only tested this working in Windows. Many an hour could have been saved if ST, in their infinite wisdom, did not disable the Toolchain tree entry in the project C/C++ properties!
Disclaimer: I'm not an experienced Eclipse user, so there is a very good chance that the steps below are not the correct way of doing things, and in future, ST might lock-down or hide more UI rendering these steps useless - you have been warned!
There are a huge number of steps required, so this is not for the fainthearted!
Prerequisite: You must have an existing CMake GNU Arm project up and running, if not, find out how set one up, or use CLion to create a CMake project from an existing STM32CubeMX .ioc.
For the steps, I'm using the following folder layout (adjust to fit your preferences):
Source (source code, folders, etc)
build
.. this where I set CMake to run the builds..
cmake
gnu-arm-stm32.cmake
...
CMakeLists.txt
Tools
STM32CubeIDE
MyProject (the skeleton project created in the below steps)
.cproject
.project
svd
STM32F446.svd
Matthew.
