Skip to main content
xlrl
Associate III
December 19, 2022
Question

STM32CubeIDE CMake integration broken for STM32CubeIDE?

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?

This topic has been closed for replies.

12 replies

Pavel A.
December 20, 2022

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.

​

xlrl
xlrlAuthor
Associate III
December 20, 2022

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.

mattias norlander
ST Technical Moderator
December 20, 2022

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
xlrl
xlrlAuthor
Associate III
December 20, 2022

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

mattias norlander
ST Technical Moderator
December 20, 2022

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...

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
SKäli.1
Associate
January 6, 2023

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

March 15, 2023

Hello, @mattias norlander​,

I also interesting in a draft of app note.

Thanks in advance