Skip to main content
KMew
Senior III
November 29, 2022
Solved

CubeIDE: No such file or directory, but file is part of include path

  • November 29, 2022
  • 1 reply
  • 15364 views

Hello,

I fear I may be getting tunnel visioned, but I am getting an error when I try to manually add the BSP files for the STM32H7B3I-EVAL board.

I am getting the following error: "Description Resource Path Location Type

fatal error: stm32h7b3i_eval.h: No such file or directory main.h /Display_CubeMXBringUp_Test/Core/Inc line 34 C/C++ Problem"

Now, the file is in the folder Drivers/BSP/STM32H7B3I-EVAL, which is part of my include path. See the picture below, including the file in the directory via the File Explorer.

Can someone help me figure out what I am doing wrong?

0693W00000WJmO2QAL.png 

0693W00000WJmP0QAL.png 

0693W00000WJmPFQA1.png

Best answer by Bob S

So main.h is trying to include the stm32h7b3i_eval.h file. Look at the console output and see what file was including main.h when it failed. My bet is that it was a cpp file and you didn't update the "include paths" for the C++ compiler.

1 reply

Bob S
Bob SBest answer
Super User
November 29, 2022

So main.h is trying to include the stm32h7b3i_eval.h file. Look at the console output and see what file was including main.h when it failed. My bet is that it was a cpp file and you didn't update the "include paths" for the C++ compiler.

KMew
KMewAuthor
Senior III
November 29, 2022

Hello Bob,

That was precisely what it was! I added it in the GCC Compiler, but not the G++ Compiler. Once I added it to both, the error went away. Thank you!