esp_vfs.h: No such file or directory
Posted: Thu May 30, 2024 10:40 am
I include esp_vfs.h in my .c file.
I also add the REQUIRES spi_flash in my CMakeLists.txt.
both of these two files in the directory : /components/fatfs/
In my main directory, I also add REQUIRES fatfs in /main/CMakeLists.txt
In VScode,as I press ctrl button and click on esp_vfs.h, it can jump to the file successfully.
The file in the path:
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "esp_vfs.h"
#include "esp_vfs_fat.h"
#include "esp_system.h"
const char *base_path = "/spiflash";
static wl_handle_t s_wl_handle = WL_INVALID_HANDLE;
Code: Select all
idf_component_register(SRCS "pm_fatfs.c"
INCLUDE_DIRS "."
REQUIRES spi_flash fatfs esp_system wear_levelling)
In my main directory, I also add REQUIRES fatfs in /main/CMakeLists.txt
Code: Select all
idf_component_register(SRCS "main.c"
INCLUDE_DIRS "."
REQUIRES driver Ymodem fatfs)
The file in the path:
How can I solve the fatal error?E:\esp\esp-idf\components\spi_flash\sim\stubs\vfs\include