Assignment 1: Install ESP-IDF and VSCode with ESP-IDF plugin
You will need Visual Studio Code and the installed ESP-IDF framework for this workshop. The first task will therefore be to install all the necessary tools.
To install ESP-IDF, use the EIM installer and install the VSCode extension according to the instructions on the GitHub pages of the ESP-IDF plugin for VS Code.
Windows:
Windows Installation
- Install EIM
- Press Windows key + R and type powershell in the dialog box that appears
- After the terminal appears, enter:
winget install Espressif.eim
- Install ESP-IDF using EIM
- Run EIM from the start menu or desktop icon
- On the welcome screen, click
Start Installationand thenCustom installationand follow the wizard. On the version selection page, choose IDF version 5.5.4 - During installation, the installer will also offer to install git or python if they are not already on your computer.
- After installation is complete, return to the installer’s version manager page and use the
Install Driversbutton in the bottom of the screen to install the necessary drivers.
- Install Visual Studio Code
- In VS Code, open Extensions (Ctrl + Shift + X or ⇧ + ⌘ + X)
- Find the ESP-IDF plugin and install it
- Wait for the Espressif icon to appear in the left panel and click on it.
- The extension will automatically find the installed ESP-IDF
Linux and Mac:
Linux and Mac Installation
- Install EIM
- If you choose installation via a package manager (brew, apt, rpm), it will handle all prerequisites for you.
- If you choose the CLI version, call
eim install -i v5.5.4 - If you choose the GUI version, click the
Start Installationbutton on the welcome screen and thenCustom installationand follow the wizard. On the version selection page, choose IDF version 5.5.4
- Install Visual Studio Code
- In VS Code, open Extensions (Ctrl + Shift + X or ⇧ + ⌘ + X)
- Find the ESP-IDF plugin and install it
- Wait for the Espressif icon to appear in the left panel and click on it.
- The extension will automatically find the installed ESP-IDF
Installing ESP BLE Prov
During one of the tasks, we will also try Wi-Fi provisioning. For this we will need an application through which we will tell our ESP chip the SSID and password for the network.
You can either search for the app in the app store of the respective system, or through the links below:
- Android: ESP BLE Provisioning
- iOS: ESP BLE Provisioning
VSCode, ESP-IDF plugin and ESP-IDF itself
You now have both the ESP-IDF plugin and ESP-IDF itself installed. How do these two things actually relate?
ESP-IDF is a standalone framework that can be used without VSCode and plugin. It is controlled
from the command line (so it has no GUI) and contains all the logic for building, flashing and
monitoring the application. So when you press e.g. the Build button in ESP-IDF Explorer
(don’t worry, we’ll explain what that means in the next lessons), the idf.py build command is
called in the end.
The ESP-IDF VSCode plugin is a wrapper/adapter that makes ESP-IDF functionality available in VSCode. In other words, it connects VSCode and the ESP-IDF framework: it creates a GUI in the form of ESP-IDF Explorer and at the same time ensures that the buttons perform their function, the output of commands is correctly displayed in VSCode, that the framework configuration is correctly reflected and so on. However, it needs the framework that runs in the background to function.
Info: The ESP-IDF framework itself can be used in other ways than just with the VSCode plugin. It has support for Clion, Eclipse, and last but not least, you can use it standalone, directly from the command line.
However, in this workshop we will be using exclusively the VSCode plugin.
You should now have a working ESP-IDF plugin for VSCode and ESP-IDF set up. So we can start with the second part of the tutorial: