2025-08-05 9:18 AM
Hello
I am using STM32CubeIDE
Version: 1.19.0
Build: 25607_20250703_0907 (UTC)
OS: Windows 10, v.10.0, x86_64 / win32
Java vendor: Eclipse Adoptium
Java runtime version: 21.0.3+9-LTS
Java version: 21.0.3
When I include libraries into my stm32 project I drag and drop a folder (from the windows explorer) int the project predefined folder "Drivers". In a second step I need to set the paths for the C-compiler, C++ compiler and linker seperately.
To do so I open the procect preferences and add a path for the C compiler: In this case The project name is TST_CCS811. and the folder to add is DebugPrintf. I click ok. - path for this folder set.
I continue to do so for the C++ compiler and the linker. The path is always the same - it works - paths set.
Now I want to add the next folder in this case GPIO_CPP.
To do so I click on the C compiler again but now - very strange - another project appears in this case TST_BME280 and not the TST_CCS811 which was selected before.
This is very annoying: If you do not recognize this strange behaviour you will add a wrong path (of another project) to jour compilers. It can take very long to find this error - trust me!
Regards
Alexander
2025-08-05 2:54 PM - edited 2025-08-05 2:55 PM
Have you renamed or cloned any of the projects?
TL;DR the Eclipse "virtual filesystem" is cool - but can become deceitful. Prefer ${ProjDirPath} instead of ${workspace_loc:...} constructs.
2025-08-10 10:29 PM
Hi,
If I shall use ${ProjDirPath} instead, how do I enter this in the IDE? usually I click on the "workspace" button.
Regards
Alexander
2025-08-12 3:10 AM - edited 2025-08-12 1:38 PM
These Eclipse macros can be entered almost in any place where you specify project settings: in C/C++ include directories, other file paths etc. Also you can define your own variables, in Properties-> C/C++ Build -> Build variables.
Unfortunately the Eclipse version on which CubeIDE is based does not allow to specify project-related paths in include dirs dialog, only "workspace path" or filesystem. It offers to create project-relative paths in other contexts.
I just edit these paths in settings manually. It is annoying but works for me.