cancel
Showing results for 
Search instead for 
Did you mean: 

why? TouchGFX compiler throws this error Core/Src/main.c:25:10: fatal error: fatfs.h: No such file or directory #include "fatfs.h"

Miguel Moran
Associate III

I am developing a small project to which I decided to add a USB-HOST in MSC (Mass Storage Class) mode, with the intention of adding a USB pen drive, obviously I require the use of FATFS (USB-DISK mode) drivers. However, the Touch v4.14 compiler gave me the error:

Core / Src / main.c: 25: 10: fatal error: fatfs.h: No such file or directory #include "fatfs.h"

I did not understand why, if KEIL v5.31 did not throw any error.

I tried several movements but I continued without favorable results

until you remember the famous "makefile" of the touchgfx, explore it and try again adding the path where the file was and "done" was all

This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Miguel Moran
Associate III

Just add the following lines marked in black, which correspond to the paths where the * .h are that the TouchGFX did not compile and the Keil did.

I hope to be helpful!

board_include_paths := Drivers/CMSIS/Device/ST/STM32F7xx/Include \

    Drivers/CMSIS/Include \

             Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS \

    Drivers/Components/ft5336 \

    Drivers/BSP \

    FATFS/App \

    FATFS/Target \

    Middlewares/Third_Party/FatFs/src \

    Middlewares/ST/STM32_USB_Host_Library/Core/Inc \

    Middlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc \

    USB_HOST/App \

    USB_HOST/Target

SKILA
Associate II

Hi @Miguel Moran​ 

This is because the simulator knows nothing about FATFS or any other hardware specific code. You need to exclude that from your code using the directive

#ifndef SIMULATOR and basically write dummy code to be used when in simulation.

Regards,

Samer