Project cannot open source files for basic C libraries

Hello all, I am new to using esp32 and I am having some issues with a ble project that I am working on. For many of the .h files references in my code it displays “cannot open source file” despite many of them being basic C or esp library files. For example, I am even receiving this message on stdio.h. I assume this is a pathing issue but am unsure of how to approach fixing it. Any advice would be appreciated, thank you.

Please show a screenshot of the problem. Are you talking about not being able to open referenced header files that should exist or are we talking about stepping into some C library functions during debugging?

I am talking about not being able to open referenced headers that should exist. Here is a picture of my includes and resulting errors.

No, then something is wrong. Do you have conflicting extensions installed? I take it this is a ESP-IDF project that you want to use with PlatformIO, so the extensions “CMake” and “ESPIDF” should be uninstalled or deactivtated. You should also do a Ctrl+Shift+P → Rebuild Intellisense.

Again, hard to judge the activated extensions when the VSCode sidebar is cropped out like that.

Ok I disabled both of those extensions and then also ran that command but still face the same issues. Is it possible that this issue could be caused by other extensions? If so, how would I go about determining which ones are problematic?

There’s not really a better way except disable them and see if something changes.

Did you restart VSCode after disabling the extensions? Does PlatformIO at least try to build the project when you go to the PlatformIO side bar → Build?

I did exit out and restart VSCode after disabling them. When I try to build the project I get this as an output.

My confusion is that this project should not require the arduino core, to my knowledge. As it is written to work on the espidf

The project I am following is this: esp32/ble-rgb at main · eprotutorials/esp32 · GitHub

What is your platformio.ini? There is no such file in the referenced repo indeed, but the platformio.ini might reference it.

Also it’s pretty much always a good idea to install Git globally.

Here is my platformio.ini

Okay. So in line 13 you’re directly telling it to download the Arduino-ESP32 core via git.

If it’s not needed, delete that line.

This ini file was generated when I started the project. I will go ahead and comment this out though.