Hi -
I'm new to VS Code, and I'm sure I'm doing something wrong, but...in one of my project files, I include stdint.h. When I hover on it and hit F12, it opens a file from an ARM toolchain that I have installed, not the one I want. I realize this is some configuration error, but I can't find it. Can someone please advise?
Thanks...
(solved) VS Code finding wrong toolchain
(solved) VS Code finding wrong toolchain
Last edited by mzimmers on Mon Sep 13, 2021 5:23 pm, edited 1 time in total.
-
- Posts: 229
- Joined: Wed May 02, 2018 12:12 pm
Re: VS Code finding wrong toolchain
Based on your feedback maybe is a misconfiguration of the C/C++ extension.
Try checking https://github.com/espressif/vscode-esp ... URATION.md for examples how to configure.
If you are not using the Espressif extension, just {config:idf.*} for the real path or use the compile_commands.json if you are able to successfully build the project.
Try checking https://github.com/espressif/vscode-esp ... URATION.md for examples how to configure.
If you are not using the Espressif extension, just {config:idf.*} for the real path or use the compile_commands.json if you are able to successfully build the project.
Re: VS Code finding wrong toolchain
Thank you, bignacio. I created that file, and it seemed to solve the problem...temporarily. Then, I tried to build (got a bunch of errors that I expected) and now, it's finding the incorrect paths again. Any idea what's going on here?
Thanks...
EDIT: could the problem arise from the fact that I don't have an environment variable for IDF_TOOLS_PATH? I see the default for it (which is the correct path), but does the extension need this explicitly defined?
Thanks...
EDIT: could the problem arise from the fact that I don't have an environment variable for IDF_TOOLS_PATH? I see the default for it (which is the correct path), but does the extension need this explicitly defined?
- Attachments
-
- esp.PNG (32.72 KiB) Viewed 4878 times
Re: VS Code finding wrong toolchain
I found the problem: the default c_cpp_properties.json file that was generated didn't include this:
I discovered this omission by comparing with the blink project. The intellisense, and the builds, seem to find the correct toolchain now.
Shouldn't this code be included in the default file that is generated within the extension?
Code: Select all
"name": "ESP-IDF",
"compilerPath": "/home/mzimmers/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/
Shouldn't this code be included in the default file that is generated within the extension?
-
- Posts: 229
- Joined: Wed May 02, 2018 12:12 pm
Re: VS Code finding wrong toolchain
While the compiler path is not part of the template file within c_cpp_properties.json but it is set when you add the vscode configuration files using the extension when running:
1) Add vscode configuration folder command
2) New Project command
3) Show Examples Projects command
4) Create project from extension template command.
In the c_cpp_properties documentation we should add it though, thanks.
1) Add vscode configuration folder command
2) New Project command
3) Show Examples Projects command
4) Create project from extension template command.
In the c_cpp_properties documentation we should add it though, thanks.
Who is online
Users browsing this forum: No registered users and 11 guests