cancel
Showing results for 
Search instead for 
Did you mean: 

Building in Designer fails for a missing include that doesn't exist

CTapp.1
Senior

When I try to "Program and Run Target" I get the following in the log window:

 

Compile
        make -f ../gcc/Makefile -j8
        Reading TouchGFX/application.config
        Reading TouchGFX/target.config
        Compiling Core/Src/main.c
        Compiling Middlewares/Third_Party/FreeRTOS/Source/croutine.c
        Compiling Middlewares/Third_Party/FreeRTOS/Source/list.c
        Compiling Middlewares/Third_Party/FreeRTOS/Source/queue.c
        Compiling Middlewares/Third_Party/FreeRTOS/Source/tasks.c
        Compiling Middlewares/Third_Party/FreeRTOS/Source/timers.c
        Compiling Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.c
        Compiling gcc/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c
        Core/Src/main.c:23:10: fatal error: fatfs.h: No such file or directory
         #include "fatfs.h"
                  ^~~~~~~~~
        compilation terminated.

 

However, the lines in main.c around the one reported as causing the error are:

 

/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "cmsis_os.h"
#include "libjpeg.h"
#include "app_touchgfx.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

 

What am I missing here? None of the includes pull in fatfs.h and FATFS is disabled in the .ioc

3 REPLIES 3
GaetanGodart
ST Employee

Hello @CTapp.1 ,

 

Can you share your main.c file up to line 30?

Can you do a global search on your project to check for the file fatfs.h?

If you find the file fatfs.h, can you check your include path to see if it is part of the included files?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Thanks - on further investigation, the project somehow has two Core folders and I was looking at the one that wasn't being used during the build!

I am trying to move a project from one machine to another - the TouchGFX project opens (and upgrades) ok, but how do I use the .cproject to build in STM32CubeIDE?

Hello @CTapp.1 ,

 

In STM32CubeIDE, the .cproject file is used internally by the IDE to manage the build configuration and settings for your project. You don't directly interact with the .cproject file to build your project; instead, you use the IDE's graphical interface to configure and build your project.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)