Skip to main content
parmi93
Associate II
November 28, 2025
Question

How to properly add include paths in STM32CubeIDE CMake Project?

I'm working on an STM32 project using STM32CubeIDE with CMake as the build system. I need to add custom include paths for my own header files.

I tried to include my_folder from C/C++ General -> Paths and Symbols -> Includes, but it doesn't work.

parmi93_0-1764339432467.png

Note that under C/C++ Build -> Settings there is no settings to include anything, which are available only when working with STM32CubeMX/STM32CubeIDE Project

parmi93_1-1764339652146.png parmi93_2-1764339662730.png

 

 

2 replies

Andrew Neil
Super User
November 28, 2025

Right-click a folder in the Project Explorer:

AndrewNeil_0-1764340250791.png

I would hope that would do things "properly" ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
parmi93
parmi93Author
Associate II
November 28, 2025

The Add/remove include path... option is not clickable...

parmi93_0-1764341834003.png