Showing results for 
Search instead for 
Did you mean: 

stm32f7xx_hal.h: No such file or directory


Hello, I have a problem with some errors appearing after generating my code, I get the error:

stm32f7xx_hal.h: No such file or directory

This file exists in Drivers/STM32F7xx_HAL_Driver/Inc, I have also looked into projects included paths and it exists there aswell.
When I hold ctrl and click on the #include stm32f7xx_hal.h in some file, it takes me to the right place, but the error still stays. What could be wrong? The error only comes after generating code.

I'm working with FREERTOS, USART3.

ST Employee

Hello @arakromet and welcome to the community,


The issue has not been reproduced on my side. Could you, please provide the used STM32CubeIDE version.

Also, It would be more helpful to share the project.




I tend to believe the compiler, review the make / build process, and ALL the parameters feed to the compiler.

I think the Release / Debug build settings can be different, make sure you're looking at the right Include Path settings, and that they are getting passed to the compiler correctly.

Review project and .IOC files, provide to ST for review

Look for odd path names, virtual directories, off the Desktop for example, spaces, special characters or hieroglyphs in file names or paths.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hello, my STM32CubeIDE version is 1.13.2.
I've also pushed the project to github:

I've uploaded my backup folder and that one does not have the error yet.
The problem will most likely occur when any change has been made in the IOC file(even a pin change) and the code has to be regenerated.