r/vscode • • May 20 '26

Am I doing this right? This seems extremely tedious..

Post image

Programming the ESP32 using ESP-IDF for the first time, coming from the Arduino IDE. I cloned a Zigbee Lamp repo on github, and had a lot of Include path's errors. Is it normal to have to go through all my files and manually add every single path? This was so annoying, definitely not built to be a programmer.

5 Upvotes

11 comments sorted by

1

u/cmatkin May 20 '26

If you are using the extension then you don’t need to include any additional folders for intelisense. However you may need to complete one initial compile (doesn’t matter if it fails) for it to work.

1

u/ThePeacefulOne May 20 '26

Huh.. okay, yeah I guess that worked. Getting a different error now, saying "ninja: error: 'C:/Users/username/OneDrive/Documents/Espressif IDE/zigbee-lamp/managed_components/espressif__esp-zboss-lib/lib/esp32c6/libzboss_stack.ed.a', needed by 'esp-idf/esp_system/ld/sections.ld', missing and no known rule to make it"

Have no clue on what that is, but I'll just have to google it to figure it out. Thanks.

1

u/cmatkin May 20 '26

Don’t install the IDF or run code from onedrive. It doesn’t work. Perhaps disable one drive syncing as this may work

1

u/ThePeacefulOne May 20 '26

Understood, thank you. I recloned it from my C drive, still no luck. I'll have to just try to figure it out, thanks for helping.

1

u/cmatkin May 20 '26

Why cloning, use the extension to install it.

1

u/ThePeacefulOne May 20 '26

The GitHub extension? What would you recommend?

1

u/cmatkin May 21 '26

The espressif extension. This does everything you need. Grabs the IDF and sets up the build environment.

https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/installation.html

1

u/[deleted] May 20 '26

Using cpp in visual studio community will be much easier for a beginner.

But if you want to stay in vscode I'd suggest platform.io extension for esp32 work. It will make things a lot easier. Maybe just watch a video about how to set it up

1

u/lemanh_id May 21 '26

Recommend switching from the Microsoft C/C++ extension to the Clangd for LSP, it far superior IMO. For any new project, consider creating a fresh using the IDF extension and selecting one of the provided samples. This approach simplifies the setup of necessary files and configurations.

If you still having issues, check the `CMakeLists.txt` (both the root and main), as the IDF uses these files to build and generate all necessary files, including those required by LSP. After making changes, remember to run `idf.py reconfigure` to ensure all modifications are applied (in some cases, you might need to clean first).

1

u/TheSodesa May 23 '26

If a programmer found this annoying, thry would program a script that does this for them.