esp-idf 4.0 build system does not find certain esp-idf include files
Posted: Thu Apr 30, 2020 6:08 am
I'm building an app with a main program and 5 custom components, which built just fine under esp-idf 3.0. It fails to build under idf v4.0 because the build system fails to find several idf include files, in particular for my app, esp_http_client.h and nvs.h. The fail message is, for example.
I know the include files are there in:
".../components/nvs_flash/include/nvs.h", and ".../components/esp_http_client/include/esp_http_client.h"
Many of the files that I "#include" in my sources are found. When compilation is terminated for failure of the build system to find these files, CMake (or is it ninja?) prints to the terminal a bunch of stuff with statements of the form:
"-IC:/Users/Steve/Desktop/esp-idf/components/freertos/include ", which I assume are default include paths supplied by the build system. I haven't verified this for all my include files, but the ones that I looked at are found through these system-supplied include paths.
I have 3 questions:
1. Where are the default include paths defined?
2. Why isn't every include path in the idf part of the default set of include paths?
3. What's the easiest most graceful way to get the paths to the include files I need into the include path set? Is it with statements in the CMakeLists.txt files that I define in my project (if so, what statement and where among the required statements) or elsewhere in the build system?
Thanks, as always, for your help.
- ../components/nvstorage/PartBinNVS.c:10:10: fatal error: nvs.h: No such file or directory
- #include "nvs.h"
- ^~~~~~~
".../components/nvs_flash/include/nvs.h", and ".../components/esp_http_client/include/esp_http_client.h"
Many of the files that I "#include" in my sources are found. When compilation is terminated for failure of the build system to find these files, CMake (or is it ninja?) prints to the terminal a bunch of stuff with statements of the form:
"-IC:/Users/Steve/Desktop/esp-idf/components/freertos/include ", which I assume are default include paths supplied by the build system. I haven't verified this for all my include files, but the ones that I looked at are found through these system-supplied include paths.
I have 3 questions:
1. Where are the default include paths defined?
2. Why isn't every include path in the idf part of the default set of include paths?
3. What's the easiest most graceful way to get the paths to the include files I need into the include path set? Is it with statements in the CMakeLists.txt files that I define in my project (if so, what statement and where among the required statements) or elsewhere in the build system?
Thanks, as always, for your help.