Hei Guys,
on compiling my project in vscode with esp-idf extension v 4.1 I get
No such file or directory error.
But the file is there.
My CPP Config is:
{
"configurations": [
{
"name": "Win32",
"cStandard": "c11",
"cppStandard": "c++17",
"includePath": [
"${config:idf.espIdfPathWin}/components/**",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${config:idf.espIdfPathWin}/components"
],
"limitSymbolsToIncludedHeaders": false
},
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
All of the other includes I used so far are working
for example:
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <esp_err.h>
#include "esp_log.h"
#include "driver/gpio.h"
#include "sdkconfig.h"
I'm 100% shure that this is another dump erro by myself missing any paths or options.
One Additional note: when I compile the spiffs project in it's component example everthing works fine.
Can anyone help me?
Manuel
#include "esp_spiffs.h" file not found
Re: #include "esp_spiffs.h" file not found
The CPP file definition doesn't matter, this is just for IntelliSense. Important for the build are the CMakeLists.txt files in your workspace directories.
That being said, I have a similar problem. I will post in a seperate thread and maybe we can solve this together.
That being said, I have a similar problem. I will post in a seperate thread and maybe we can solve this together.
Re: #include "esp_spiffs.h" file not found
I previously had problem to add components until someone here made me realize the CMakeLists.txt needed to add components :
idf_component_register(SRCS "....c/h" INCLUDE_DIRS "." REQUIRES componentX) componentX being the folder inside component folder.
Now i have again this problem. I added another component the same way as my other and still gives me no such file or directory. CMakeLists.txt are weird
idf_component_register(SRCS "....c/h" INCLUDE_DIRS "." REQUIRES componentX) componentX being the folder inside component folder.
Now i have again this problem. I added another component the same way as my other and still gives me no such file or directory. CMakeLists.txt are weird
Re: #include "esp_spiffs.h" file not found
Hei Guys,
as I was able to solve this after reading your comments I wanted to line out the solution:
In the Following you can see the CMakeLists.txt of the component I'm developing:
idf_component_register(SRCS "MKSPIFFS.cpp" INCLUDE_DIRS "." REQUIRES "MKException" "spiffs")
Adding the "spiffs" after REQUIRED did solve the issue. I didn't know this is neccessary for Standard ESP-IDF components and was using this before for my Components alone (as e.g. here the MKException for a self defined Exception)
Hope this can halp you too.
Manuel
as I was able to solve this after reading your comments I wanted to line out the solution:
In the Following you can see the CMakeLists.txt of the component I'm developing:
idf_component_register(SRCS "MKSPIFFS.cpp" INCLUDE_DIRS "." REQUIRES "MKException" "spiffs")
Adding the "spiffs" after REQUIRED did solve the issue. I didn't know this is neccessary for Standard ESP-IDF components and was using this before for my Components alone (as e.g. here the MKException for a self defined Exception)
Hope this can halp you too.
Manuel
Who is online
Users browsing this forum: No registered users and 416 guests