Installing the plugin on top of existing ESP-IDF etc.
Posted: 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
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