2025-03-26 5:01 AM
Hi all,
Previously, I've been adding all paths with the used header files in the Project->Properties->C/C++ Build->Settings->MCU GCC Compiler->Include paths->Include paths (-I), like this:
It has been working pretty well, until it just stopped. The last thing that I've tried to add is "${workspace_loc:/${ProjName}/Firmware/MCU/Processor/FPU/FPU_Reg}" path and the compiler doesn't see header files stored there anymore. So, if I write #include "Cortex_M4_FPU_Reg.h" in source files, the build console throws out this error:
but when I write #include <FPU/FPU_Reg/Cortex_M4_FPU_Reg.h>, everything is ok.
Does anyone know why Include paths (-I) worked previously, but now it stopped accepting new paths?
Solved! Go to Solution.
2025-03-26 5:16 AM
The detailed console output shows the compile... commands with all and flags including the -I that made it to the command line. You may want to post it here for better analysis.
Hope you have double-checked your file&folder structure, especially for (case sensitive) spelling errors or exotic chars in paths.
It seems to be something custom which I don't recognize.
hth
KnarfB
2025-03-26 5:16 AM
The detailed console output shows the compile... commands with all and flags including the -I that made it to the command line. You may want to post it here for better analysis.
Hope you have double-checked your file&folder structure, especially for (case sensitive) spelling errors or exotic chars in paths.
It seems to be something custom which I don't recognize.
hth
KnarfB
2025-03-26 5:36 AM
Thanks for the suggestion. I've attached the build console log, although it's massive. What I've noticed though is that for some source files, the necessary command (-I"D:/ST/My_Projects/Sensors_To_LEDs_Interface/Firmware/MCU/Processor/FPU/FPU_Reg") is performed, but for the exact source file where the #include "Cortex_M4_FPU_Reg.h" string is located (STM32F303_C_TIM_HAL.c) this command is omitted, so the error occurs. No idea why, though.
2025-03-26 5:44 AM - edited 2025-03-26 6:06 AM
Ok, I've solved the issue, but I have a related question on how these Include paths (-I) are supposed to work. So, as I said, I configured them previously for the whole project by clicking Project->Properties->C/C++ Build->Settings->MCU GCC Compiler->Include paths->Include paths (-I).
But now, what fixed the error is configuring Include paths (-I) for the "Firmware" folder within the project specifically, so "Firmware folder"->Properties->C/C++ Build->Settings->MCU GCC Compiler->Include paths->Include paths (-I).
I don't understand, why Firmware folder has a different Include paths (-I) configuration from the Project.
2025-03-26 9:13 AM
Great. Generally, these settings apply hierarchically. You may adjust them for individual files as well.
hth
KnarfB
2025-03-26 9:27 AM - edited 2025-03-26 9:27 AM
Try using ${ProjDirPath}/... instead of ${workspace_loc:/${ProjName}/... }
Eclipse is so complicated ((