Installing the plugin on top of existing ESP-IDF etc.

hamishcunningham
Posts: 11
Joined: Mon Jun 05, 2017 7:50 pm

Installing the plugin on top of existing ESP-IDF etc.

Postby hamishcunningham » Tue Dec 08, 2020 12:04 pm

hi,

Great plugin!

I found it complex to get it to run on top of an existing IDF though (on Ubuntu 20.04). I think that the plugin install process might try to do python prerequisites automagically, and might try picking up python, PATH and OPENOCD_SCRIPTS from environment?

I ended up doing the below to get it to work. (Previously I kept getting python inaccessible errors, and/or tools don't exist.)

HTH,
Hamish


- prereqs, inc.:
- sudo apt-get install python3-venv
- see the [installation guide](https://github.com/espressif/vscode-esp ... tion-guide)
for more details
- install VSCode (`snap install --classic code` on Ubuntu)
- download esp-idf (e.g. via `magic.sh idf-install`)
- activate the python environment: `source
~/.espressif/python_env/idf4.3_py3.8_env/bin/activate`
- set up env vars `source ~/esp/esp-idf/export.sh`
- launch VSCode, e.g.: `code`
- `Cntrl+P`
- `ext install espressif.esp-idf-extension`
- close VSCode
- do plugin prereqs, e.g.
`~/.espressif/python_env/idf4.3_py3.8_env/bin/python -m pip install -r ~/.vscode/extensions/espressif.esp-idf-extension-0.5.1/esp_debug_adapter/requirements.txt`
- relaunch VSCode
- press F1 and select ESP-IDF: Configure ESP-IDF extension
- configure the extension to use your IDF; feed it your values of `PATH`,
`OPENOCD_SCRIPTS` and python, e.g.
`~/.espressif/python_env/idf4.3_py3.8_env/bin/python`
- relaunch VSCode, e.g.: `code iot4/firm/HelloWorld`
- see [getting started](https://docs.espressif.com/projects/esp ... setup.html),
or click the `build/flash/monitor` button on the bottom bar

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

Re: Installing the plugin on top of existing ESP-IDF etc.

Postby ESP_bignacio » Wed Dec 09, 2020 4:49 am

We explained how to configure the extension without using the onboarding window and reusing existing ESP-IDF install here.

We are remaking the onboarding in this Pull request to auto detect ESP-IDF on default locations and overall simplify the setup in the wizard. Please give it a try if you have some time.

Who is online

Users browsing this forum: No registered users and 12 guests