cancel
Showing results for 
Search instead for 
Did you mean: 

Error when including FatFs.h >> No such file or directory

FSULE.1
Associate II

Deer electronicians,

I was following the video "STM32 – Creating a File System on a SD card" from the ST Youtube channel.

I done stricty the same things as in the video but an error occurs.

../Core/Src/main.c:22:10: fatal error: fatfs.h: No such file or directory
   22 | #include "fatfs.h"
      |          ^~~~~~~~~
compilation terminated.

I tried to enter manually the include path for all the files concened but many new errors are rising.

My config :

  • STM32F746-DISCO (the same as in the video)
  • STM32CubeIDE 1.6.0
  • Firmware F7 1.16.1
  • Windows 10 64 bits

I stay reachable for any questions or precisions.

Cordialement,

François

1 ACCEPTED SOLUTION

Accepted Solutions
FSULE.1
Associate II

Issue solved !!!!

I just changed some parameters :

1 - change the repository path (mine was a problem because i was having a "ç" in the name via the firmware updater

2 - when creating a project : select the first option : add necessary library ....

0693W000008wWPkQAM.png 

Tadam !!

View solution in original post

5 REPLIES 5

Should be able to add include paths to project for compiler to search on.

Show compiler command line, and configuration pane with paths.​

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

the text is too lon to be pasted here.

is it what yous asked ? or do you want something particular in the properties tab ?0693W000008wW8AQAU.png

FSULE.1
Associate II
-mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F746xx -c -I../Core/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc -I../Drivers/STM32F7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F7xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage --specs=nano.specs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb

took on the project properties > C/C+ build > Settings

FSULE.1
Associate II

Issue solved !!!!

I just changed some parameters :

1 - change the repository path (mine was a problem because i was having a "ç" in the name via the firmware updater

2 - when creating a project : select the first option : add necessary library ....

0693W000008wWPkQAM.png 

Tadam !!

That doesn't look to have paths to the Middleware directories

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