SOLVED - ESP32 & Visual Code, Setting the include search path in platformio.ini


#1

Hello,

I am trying to setup the environment to use the esp-mdf library with ESP32…
Now, I need to add the esp-mdf library folders to the project search paths, I tried many ways, but it appears I am able to add only a single search path, and as I add another one, the previous one appears not to be used anymore…

I tried :

[platformio]
src_dir = main
include_dir = F:/ESP32/esp-mdf/components/base_components/mdf_mics/include/

and other options, but it appears I am not able to more than one path each time ( apart using the -I option of the build flags, with an almost infinite long line )…

Is there a ( maybe easy ) way to do what I am trying to do…?

Thanks

Kind Regards

Alex


#2

Ok, fixed myself…no more help needed


#3

Hi Alex,

Can you tell us how you can fix please?


#4

Hi,
the problem was in the syntax style…
I simply wrote it the ‘include_dir =’ in a single line, all the paths then on the next line with a TAB at the start…

include_dir =
{TAB}F:/ESP32/esp-mdf/components/base_components/mdf_mics/include/
{TAB}F:/ESP32/esp-mdf/components/base_components/mdf_mics/…

However, finally I used the ‘build_flags’ statement with same style, to force the compiler to make the search…

Alex