Be Warned, New VS Code Ext. along side other ESP-IDF versions

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: Be Warned, New VS Code Ext. along side other ESP-IDF versions

Postby mikemoy » Sat Jan 18, 2020 6:23 pm

Code: Select all

Another bonus, i am using AWSFreeRTOS and i can use espressif plugin to flash and monitor app by using icons at bottom, assuming project is build from CLI.
Thanks for the info, After my last episode, I am going to play it careful and wait until this project is finished before trying your great ideas.

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: Be Warned, New VS Code Ext. along side other ESP-IDF versions

Postby ESP_bignacio » Mon Jan 20, 2020 10:07 am

We are not modifying .bashrc, .profile or your system environment variable in any way. We override the visual studio code process.env (from extension context, nodejs) with values from the following vscode configuration on runtime and not persisting these changes. If you can replicate this error with steps on clean setup, please post an issue in https://github.com/espressif/vscode-esp ... ion/issues so we can explore a solution to this issue.

Here a description of the key configuration settings in our extension and how extension uses it.

1) idf.pythonBinPath is used to executed python scripts within the extension. In ESP-IDF: Configure ESP-IDF extension we first select a idf.pythonSystemBinPath from which we create a python virtual environment and we save the executable from this virtual environment in idf.pythonBinPath. All required python packages by ESP-IDF are installed in this virtual environment, if using ESP-IDF: Configure ESP-IDF extension.
2) idf.customExtraPaths is pre-appended to your system environment variable PATH within visual studio code (not modifying your system environment) before executing any of our extension commands such as openocd or cmake (build your current project) else extension commands will try to use what is already in your system PATH. In ESP-IDF: Configure ESP-IDF extension you can download ESP-IDF Tools or skip download and manually enter all required ESP-IDF Tools as explain in https://github.com/espressif/vscode-esp ... OARDING.md which will be saved in idf.customExtraPaths.
3) idf.customExtraVars stores any custom environment variable we use such as OPENOCD_SCRIPTS, which is the openOCD scripts directory used in openocd server startup. We add these variables to visual studio code process environment variables, choosing the extension variable if available, else extension commands will try to use what is already in your system PATH. This doesn't modify your system environment outside visual studio code.
4) idf.adapterTargetName is used to select the chipset (esp32, esp32 s2, etc.) on which to run our extension commands.
5) idf.openOcdConfigs is used to store an array of openOCD scripts directory relative path config files to use with OpenOCD server. (Example: ["interface/ftdi/esp32_devkitj_v1.cfg", "board/esp32-wrover.cfg"]).
6) idf.espIdfPath is used to store ESP-IDF directory path within our extension. We override visual studio code process IDF_PATH if this value is available. This doesn't modify your system environment outside visual studio code.

Please let us know if any thing is not clear from here.

Who is online

Users browsing this forum: No registered users and 55 guests