2023-10-06 08:39 AM
Hi Folks,
I'm trying to build a LVGL project and I'm running into a problem that I can't resolve. I get 25 errors all saying the same thing - "stm32f7xx.h" - no such file or directory.
Here are my include settings:
:
Here's the first of the 25 errors:
C:/Users/Richard/iCloudDrive/ABC_Consulting/Controls/Kcompany_7000/Disco/HAL_Driver/Inc/stm32f7xx_hal_def.h:46:10: fatal error: stm32f7xx.h: No such file or directory
46 | #include "stm32f7xx.h"
In my file stm32f7xx_hal_def.h:
/* Includes ------------------------------------------------------------------*/
#include "stm32f7xx.h"
#include "Legacy/stm32_hal_legacy.h"
#include <stdio.h>
What can I change to get the code to compile?
Thanks,
Richard
Solved! Go to Solution.
2023-10-08 04:46 PM
The compiler needs to know where to find the include file, so it will need to be added to the include paths directories within the project properties.
2023-10-06 09:24 AM
The way the tree displays, does this relate to a specific "Build" selection, perhaps not the one being used?
2023-10-06 09:33 AM
The error says "stm32f7xx.h" is missing. Your screenshot is showing "stm32f723xx.h". These are different files.
You have a non-standard directory structure. Usually the file is in "/Drivers/CMSIS/Device/ST/STM32F7xx/Include"
2023-10-06 11:35 AM
TDK,
Actually the "stm32f7xx.h" is in the subdirectory you showed. I guess I made a mistake in the screen captures I inserted. Does that mean I need to add that directory to the path? Or should that be built-in after the CubeIDE makes the project?
Thanks,
Richard
2023-10-08 04:46 PM
The compiler needs to know where to find the include file, so it will need to be added to the include paths directories within the project properties.
2023-10-10 08:29 AM
TDK,
What should I do if I continue to get the errors even after I add the include path to the include path directories?
Thanks,
Richard
2023-10-10 12:31 PM
Keep searching until you find the error.
Generate a CubeMX project and copy the directory structure there.
If you are stuck, perhaps show all the evidence that you have done things correctly. Provide screenshots, full logs with error messages, etc. You did some of that in the opening post, but as already mentioned, you aren't showing the file it can't find.