include path from c_cpp_properties.json not used

julienD
Posts: 32
Joined: Fri Sep 13, 2019 12:38 pm

include path from c_cpp_properties.json not used

Postby julienD » Fri Jan 13, 2023 1:12 pm

Hello

I'm porting an existing code to idf5 and vsCode.
Some modules don't compile because of:

Code: Select all

  15 | #include "driver/gpio.h"
  
  -->  fatal error: driver/gpio.h: No such file or directory
In the compiler command line, I can see many idf paths used for includes finding.
/home/ju/esp5/esp-idf/components/newlib/platform_include -I/home/ju/esp5/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/ju/esp5/esp-idf/components/freertos/esp_additions/include/freertos -I/home/ju/esp5/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/ju/esp5/esp-idf/components/freertos/esp_additions/include -I/home/ju/esp5/esp-idf/components/esp_hw_support/include -I/home/ju/esp5/esp-idf/components/esp_hw_support/include/soc -I/home/ju/esp5/esp-idf/components/esp_hw_support/include/soc/esp32 -I/home/ju/esp5/esp-idf/components/esp_hw_support/port/esp32/. -I/home/ju/esp5/esp-idf/components/esp_hw_support/port/esp32/private_include -I/home/ju/esp5/esp-idf/components/heap/include -I/home/ju/esp5/esp-idf/components/log/include -I/home/ju/esp5/esp-idf/components/soc/include -I/home/ju/esp5/esp-idf/components/soc/esp32/. -I/home/ju/esp5/esp-idf/components/soc/esp32/include -I/home/ju/esp5/esp-idf/components/hal/esp32/include -I/home/ju/esp5/esp-idf/components/hal/include -I/home/ju/esp5/esp-idf/components/hal/platform_port/include -I/home/ju/esp5/esp-idf/components/esp_rom/include -I/home/ju/esp5/esp-idf/components/esp_rom/include/esp32 -I/home/ju/esp5/esp-idf/components/esp_rom/esp32 -I/home/ju/esp5/esp-idf/components/esp_common/include -I/home/ju/esp5/esp-idf/components/esp_system/include -I/home/ju/esp5/esp-idf/components/esp_system/port/soc -I/home/ju/esp5/esp-idf/components/esp_system/port/include/private -I/home/ju/esp5/esp-idf/components/xtensa/include -I/home/ju/esp5/esp-idf/components/xtensa/esp32/include -I/home/ju/esp5/esp-idf/components/esp_timer/include -I/home/ju/esp5/esp-idf/components/lwip/include -I/home/ju/esp5/esp-idf/components/lwip/include/apps -I/home/ju/esp5/esp-idf/components/lwip/include/apps/sntp -I/home/ju/esp5/esp-idf/components/lwip/lwip/src/include -I/home/ju/esp5/esp-idf/components/lwip/port/esp32/include -I/home/ju/esp5/esp-idf/components/lwip/port/esp32/include/arch
But "esp-idf/components/driver/include" is not part of them.

Question: is it a bug in idf?
If no:
Idf plugin in vscode generates a file called c_cpp_properties.json which seems to contain
an includePath variable that may suit my needs but whatever I put in this variable, nothing change.
Why?

I can of course fix this by adding the specific include path to any CMakeLists.txt that requires it but I'm not sure
it's the good way to as other include dirs are provided "for free".

Thanks
Julien

Who is online

Users browsing this forum: No registered users and 143 guests