Skip to main content
fsch
Associate II
Question

Is it planned to generate CMake project?

Hi,

are there plans on offering a generator for plain CMake projects?

Currently the only way that works is to use CLion to convert the project to CMake but it would be nice if CubeMX supported CMake directly.

This topic has been closed for replies.

6 replies

Khouloud ZEMMELI
ST Employee

​Hello @fsch​ ,

There's no plan for CubeMX to support CMake . But I will share your request with the team to be internally analysed.

Best Regards,

Khouloud.

yakleg
Visitor II

+1

It will be extremely useful.

Uwe Bonnes
Chief

+1

FS.1
Associate III
yakleg
Visitor II

Thx.

Voted.

elMachete
Visitor II

I wrote a simple CMake script to automatically generate libraries from CubeMX projects:

https://github.com/jmacheta/cubemx-cmake

It uses CubeMX CLI functionality to generate Makefile project, then parses Makefile to get relevant information(i.e. sources, include directories, defines and linker script) to create CMake OBJECT library.

Based on that, it should be easy to generate CMake package. Let me know if anyone needs such functionality,:)