Skip to main content
NHuy.1
Associate
April 2, 2020
Question

header file included but not found

  • April 2, 2020
  • 1 reply
  • 2273 views

Hello, I am getting started with STM32F429 touch screen. I generated code using STM32CubeMX and then copied the touch screen project from the reference source code. I created a source folder and put all the libraries of the reference source code into it. When I build the project, some header file cannot be found although pressing Ctrl and clicking on the file name in the include lines still opens that missing file in source folder

Here is my project directory tree and the error I got0693W000000VBoxQAG.png

Link to download reference project that I used

https://www.st.com/en/embedded-software/stsw-stm32138.html#overview

console

arm-atollic-eabi-gcc -c -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu11 -DUSE_HAL_DRIVER -DSTM32F429xx -I../Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/Third_Party/FreeRTOS/Source/include -I../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -I../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../Middlewares/ST/STM32_USB_Host_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -Os -ffunction-sections -fdata-sections -g -fstack-usage -Wall -specs=nano.specs -o Drivers\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_usart.o ..\..\..\en.stsw-stm32138\STM32F429I-Discovery_FW_V1.0.1\Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_usart.c
..\..\..\en.stsw-stm32138\STM32F429I-Discovery_FW_V1.0.1\Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_usart.c:92:29: fatal error: stm32f4xx_usart.h: No such file or directory
 #include "stm32f4xx_usart.h"

This topic has been closed for replies.

1 reply

TDK
Super User
April 2, 2020

The IDE and the compiler have different logic to find includes, so one working does not necessarily mean the other will.

It looks like you're using standard peripheral drivers but failed to include the path to them. There should be an include path to "\path\to\STM32F4xx_StdPeriph_Driver\inc" somewhere. I only see include paths for HAL.

"If you feel a post has answered your question, please click ""Accept as Solution""."
NHuy.1
NHuy.1Author
Associate
April 3, 2020

Thanks for your advice i found out how to include path correctly

Thanks you so much