Hi, I am new to programming and I get an error when I try to include esp_vfs_fat.h in ESP-IDF v5.1.1. esp_vfs_fat.h exists in C:\Espressif\esp-idf\components\fatfs\vfs I have a problem. How can I resolve this? The target device is esp32-s3.
Here is the error code
C:/ESP32_projects/ecorun_main_2023/main/settings.cpp:7:10: fatal error: esp_vfs_fat.h: No such file or directory
7 | #include "esp_vfs_fat.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
I am using a translator, so I apologize if my English is not correct.
Thank you for your support.
Include error in esp_vfs_fat.h
Re: Include error in esp_vfs_fat.h
Try editing the CMakeLists.txt of the component/main application to require fatfs, something like this:
replace SRCS with your source code and INCLUDE DIRS accordingly.
Code: Select all
idf_component_register(SRCS "src/fatFS.c"
INCLUDE_DIRS "src" "include"
REQUIRES "fatfs"
)
Re: Include error in esp_vfs_fat.h
It works. Thank you very much.
Who is online
Users browsing this forum: Google [Bot] and 255 guests