I have a project with subprojects in the root subdirectory examples. Each subdirectory contains directory src for source code and include for header files. I specify the layout for individual subprojects using build_src_filter and build_flags. Example
[env:example1]
...
build_src_filter +<../examples/example1/src>
build_flags = -Iexamples/example1/include
[env:example2]
...
build_src_filter +<../examples/example2/src>
build_flags = -Iexamples/example2/include
It always worked fine, but now I have a problem with the Adafruit TinyUSB and Wire_nRF52.cpp library, which gives me the following error:
/Users/robert/.platformio/packages/framework-arduinoadafruitnrf52/libraries/Wire/Wire_nRF52.cpp:32:10: fatal error: Adafruit_TinyUSB.h: No such file or directory
What’s strange, everything works if I redefine the include_dir definition. If I define, for example, this
[platformio]
include_dir = examples/example2/include
the program example2 compiles without error.
Any idea?