VSCode is not including esp-idf/components/ path
Posted: Wed Dec 21, 2022 8:11 am
Hello all,
Please forgive my ignorance, I'm a complete newb. I've been trying to solve this issue for the last couple of days, and I can't seem to figure out what I'm doing wrong. I'm following a tutorial (https://embeddedexplorer.com/controllin ... ow-energy/) using VS Code and when I build the project I get a fatal error for "nvs_flash.h" and "driver/gpio.h" stating "No such file or directory." I have ~/esp/esp-idf/components folders installed with all the required files & folders (including the ./components/nvs_flash/ and ./components/driver/gpio/ folders) on my system. But it appears as if the build is only searching the workspace/components folder and not the /esp/esp-idf/ directory. I also noticed that when I open the C/C++ Configurations UI, the Include path has a few lines highlighted in red, "Cannot find: /User/me/workspace/project/${env" and "Cannot find: /User/me/workspace/project/IDF_PATH}/components/". This error leads me to believe that there is a line somewhere that has "${env:IDF_PATH}/components/" that is not being parsed properly and splitting the path at the colon (:). But I don't know where to look and I can't find it (and it's not in the "c_cpp_properties.json" file. I've checked and also tried adding/removing similar include paths, with no success). That is just a guess, though. Any help would be greatly appreciated!
Also, is there a resource/guide/document anywhere that explains exactly what/how to use the path commands (e.g. ${config:idf.espxxxxx}, ${workspaceFolder}, etc)? Thank you very much!
Respectfully,
Nathan J
Please forgive my ignorance, I'm a complete newb. I've been trying to solve this issue for the last couple of days, and I can't seem to figure out what I'm doing wrong. I'm following a tutorial (https://embeddedexplorer.com/controllin ... ow-energy/) using VS Code and when I build the project I get a fatal error for "nvs_flash.h" and "driver/gpio.h" stating "No such file or directory." I have ~/esp/esp-idf/components folders installed with all the required files & folders (including the ./components/nvs_flash/ and ./components/driver/gpio/ folders) on my system. But it appears as if the build is only searching the workspace/components folder and not the /esp/esp-idf/ directory. I also noticed that when I open the C/C++ Configurations UI, the Include path has a few lines highlighted in red, "Cannot find: /User/me/workspace/project/${env" and "Cannot find: /User/me/workspace/project/IDF_PATH}/components/". This error leads me to believe that there is a line somewhere that has "${env:IDF_PATH}/components/" that is not being parsed properly and splitting the path at the colon (:). But I don't know where to look and I can't find it (and it's not in the "c_cpp_properties.json" file. I've checked and also tried adding/removing similar include paths, with no success). That is just a guess, though. Any help would be greatly appreciated!
Also, is there a resource/guide/document anywhere that explains exactly what/how to use the path commands (e.g. ${config:idf.espxxxxx}, ${workspaceFolder}, etc)? Thank you very much!
Respectfully,
Nathan J