Fatal error: No such file or directory

Hi Guys,

I am new to ESP32 development so I might have done som rookie mistakes here but what ever I do it seems that I cannot get platformio and IntelliSense to agree on where the files to be used from the #include section are located. Any thoughts and ideas are very much appreciated.

I use platformIO in VSCode on a PC to which I have an Espressif ESP32-C6-DevKit-C1 set up, so far with no electronics attached. First test with Wi-Fi worked fine and I managed to get the ESP32 connected to the wifi. But Bluetooth BLE is an entirely different matter it seems.

When I try to do a script using BLE it seems platformio, the compiler or some process cannot find the BLE components I have in the #include statements. In addition to the settings mentioned below I have also enabled bluetooth in menuconfig.

I have set up the paths in the platformio.ini, the src CMakeList.txt, c_cpp_properties.json and in the include path in the IntelliSense Configuration. From what I can gather some files may be found but then files they in their turn point to are not found. I have searched for the locations of these files and included them. As far as I can see I have all paths, but for some reason I cannot see, the paths are not accepted.

Any steps that I can do additionally to find the error? What am I missing?

Again, all feedback are welcome and ny thoughts are highly appreciated.

Cheers

Sorry for the collage, new users are only allowed one picture.

You should not configure the Bluetooth stack via these build_flags = -I, delete them all. You should enable them via the menuconfig menu via the CLI, as documented

https://docs.platformio.org/en/stable/frameworks/espidf.html#configuration

For the NimBLE stack, you for sure want at least BT_ENABLED and BT_NIMBLE_ENABLED turned on (config options).

There are PlatformIO example available for ESP-IDF + bluetooth, e.g.,

https://github.com/platformio/platform-espressif32/tree/develop/examples/espidf-ble-eddystone

in which you can see

Thank you @maxgerhardt Maximilian! And thank you for the links, very much appreciated!

Cheers