cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE CMake integration broken for STM32CubeIDE?

xlrl
Associate II

Our last working version of CMake in STM32CubeIDE was in 1.9.0. After I upgraded the CMake builder was not selectable again (this happened during the step where I comment out the nature and make changed in the Tool Chain Editor).

What can I do?

13 REPLIES 13
Pavel A.
Evangelist III

If all you want is to debug a executable (elf) built with CMake - then CubeIDE can do this without any effort. See the fine manual how to debug a "foreign" elf file.

Basically, CubeIDE will create a simple unmanaged (makefile) CDT project for the elf file.

So you'll need to start from some Eclipse workspace where this project will be saved.

Later you can tweak this project in CubeIDE as usual.

mattias norlander
ST Employee

Hi @xlrl​,

CubeIDE does not officially support CMake. Not validated/tested by us.

There are no guarantees from us that CubeIDE is in-sync with up-stream Eclipse Marketplace plug-ins. Also not sure about the development status for eclipse4cmake etc...

Did you use any particular plug-ins from Eclipse Marketplaces or did you setup the support yourself?

We have drafted an "app note" which has not yet been published on how you can get started with CMake + CubeIDE. The document is just in draft status and is by no means "the perfect solution".

It is a pragmatic approach to connect CubeIDE build configurations and build targets with the equivalent of the CMakeLists.txt

I am happy to share this document/guide via PM to anyone interested in the topic in exchange for feedback! 😉

Kind regards, Mattias

Thanks for the answer!

Our main purpose is to use CMake for the builds, the debug is somewhat important but possible in both cases. It's just nice to have the same identical compiler settings from within the IDE as with a build script or as part of a CI. Still hoping to get this to work somehow even for newer versions of STM32CubeIDE.

I would be interested which part of the IDE changed so the integration stopped working. I am willing to debug and also willing to work on a bugfix...

Thanks a lot,

Alex

Oh sorry, seem my reply was more targeted to the first answer by Pavel A. Would be nice to a this guide via PM and is fine to provide feedback to this.

Thanks for the answer,

Our main purpose is to use CMake for the builds, the debug is somewhat important but possible in both cases. It's just nice to have the same identical compiler settings from within the IDE as with a build script or as part of a CI. Still hoping to get this to work somehow even for newer versions of STM32CubeIDE.

Hi @mattias norlander​,

I would be very interested in seeing this draft appnote on STM32CubeIDE + CMake myself and would be grateful if you could send it my way too. ​

It is a great pity that STM32CubeIDE still does not allow the Eclipse marketplace CMake plugins to function normally as a large amount of the industry is moving to CMake as a standard build system. ​The two things CMake has over make, is that it is much much easier to multitarget and manage libraries/dependencies.

All the best,

Matthew. ​

Regarding the plugins: I only added CMake Editor and cmake4eclipse. For the changes to the project I followed the (manual) steps here: https://community.st.com/s/question/0D53W00000S6WiuSAF/stm32cubeide-cmake-integration

mattias norlander
ST Employee

E-mails with draft app note sent to @xlrl​  and @Community member​.

Anyone else curious and willing to share feedback? Let me know!

Primarily we are looking for feedback on if the approach we suggest covers the use cases needed by customers... If so, we can imagine polishing it. Adding project wizards etc, to get rid of or at least limit the manual setup steps required...

But the key thing is whether the solution works well in edit-compile-debug cycle...

Hi @mattias norlander​ ,

I would also be interestd in trying your approach with CMake as we are currently looking into a transfer to a more platform independent build system.

Thanks!

Samuel