Skip to main content
Associate
Mar 21, 2025 9:03 AM UTC
Solved

X-CUBE-MATTER and CMake

Hi,

I want to use CLion for development, which requires CMake, and I've been struggling with integrating the X-CUBE-MATTER package in it.

Globbing all files with

file(GLOB_RECURSE src_files "Middlewares/*.c" "Middlewares/*.cpp" "Drivers/*.c" "Drivers/*.cpp")

produces a binary significantly larger than FLASH and still fails to compile because it includes various examples and templates.

Another option I thought of is manually adding all the necessary files, however that seems like a herculean task.

Is there an easier way to go on about this (perhaps ST is already working on it)?

 

Thank you for your reply.

This topic has been closed for replies.
vohorciBest answer
Associate
Apr 11, 2025 4:06 PM UTC

I actually managed to get it working by exporting all c/cpp files from the .project file from e.g. Projects\STM32WB5MM-DK\Applications\Matter\Lighting-App\STM32CubeIDE

2 replies

STTwo-32
ST Technical Moderator
Apr 10, 2025 8:04 PM UTC

Hello @vohorci 

For now, there is not a recommended way for this specific request.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
vohorciAuthorBest answer
Associate
Apr 11, 2025 4:06 PM UTC

I actually managed to get it working by exporting all c/cpp files from the .project file from e.g. Projects\STM32WB5MM-DK\Applications\Matter\Lighting-App\STM32CubeIDE