nefen1 wrote: ↑Mon Jan 23, 2023 7:35 am
Then, I thought it
might be a more professional way and I had somewhere read that esp-idf add-on will find the different esp-idf installations when I run the "ESP-IDF: Configure ESP-IDF Extension" and will give me a choice to select one from the already installed.
I thought there might be a way to make this nice procedure to work.
found your post in the process of figuring that out on my own, thought I'd add my experience as of 2024, maybe save someone else a few hours.
You were on the right track in the config esp idf, or a least you would be with the current extension. The key was finding the "
save scope" parameter and setting it to "workspace folder" (not global, or workspace). Older version versions had it @ the selection screen in (ESP-IDF:Config...), current version just reports it on that screen. the setting itself can be found in the extension settings page of vscode*.
That option will change the line directly above the "express installation" button @ (ESP-IDF:Config...).
by default (save scope = global) that line will read: "Configuration settings will be saved in
User Settings"
after setting save scope = workspace, you'll see: ("Configuration settings will be saved in a
Workspace Folder Settings."
now the framework you select, will only apply to your current project folder. whenever you open that workspace folder, it will be set to that framework. I able to literally compile one project on 5.2 and one on 4.4.7 in side by side vscode windows!
only messy part, to start a new project, from an example, with a particular framework, you'll need to put that setting back to global, since, before you've made a project, there is no project folder to store the configuration. Really makes me wonder why they removed that option from the config screen?!?
hope this helps someone!
this video helped me work this out, I dont even speak spanish (its in spanish)...but computers are computers!
https://www.youtube.com/watch?v=wECRvsFtfD8
*right pane->extensions->esp-idf->click the gear-->select "extension settings"