Install ESP-IDF and Tools
After installing Visual Studio Code (VS Code), install the ESP-IDF extension for VS Code.
Navigate to
View
>Extensions
or the keyboard shortcut Ctrl+Shift+X in Windows/Linux or Shift+⌘+X in macOS.Search for ESP-IDF in the list of extensions.
Install the ESP-IDF extension.
Navigate to
View
>Command Palette
.Type
ESP-IDF: Configure ESP-IDF Extension
and select the command to launch the setup wizard. A loading notification will appear, followed by the setup wizard.
Note
For versions of ESP-IDF < 5.0, spaces are not supported in configured paths.
Choose
Express
and select the download server:Espressif
: Faster speed in China using Espressif download servers.Github
: Using GitHub release links.
Pick an ESP-IDF version to download or use the
Find ESP-IDF in your system
option to search for an existing ESP-IDF directory.Choose the location for ESP-IDF Tools (
IDF_TOOLS_PATH
), which defaults to%USERPROFILE%\.espressif
on Windows and$HOME\.espressif
on macOS/Linux.Note
Make sure that
IDF_TOOLS_PATH
does not contain spaces to avoid build issues. Also, ensure thatIDF_TOOLS_PATH
is not the same directory asIDF_PATH
.Note
For macOS/Linux users, select the Python executable to create the ESP-IDF Python virtual environment.
Click
Install
to begin downloading and installing ESP-IDF and ESP-IDF Tools.A page will appear showing the setup progress status:
ESP-IDF download progress
ESP-IDF Tools download and installation progress
Creation of a Python virtual environment and installation of ESP-IDF Python requirements
If everything installs correctly, you will see a message indicating that all settings have been configured.
Note
For Linux users, a message will prompt you to add OpenOCD rules in
/etc/udev/rules.d
. You need to run this with sudo privileges.The next step is to Create an ESP-IDF Project.
Warning
Check the Troubleshooting section if you encounter any issues during installation.
Uninstall ESP-IDF VS Code Extension
To uninstall the ESP-IDF VS Code extension, follow these steps:
Open Command Palette (press shortcut F1) and type
ESP-IDF: Clear Saved ESP-IDF Setups
. Select the command to remove all ESP-IDF settings.Navigate to
View
>Extensions
or use the keyboard shortcut Ctrl+Shift+X in Windows/Linux or Shift+⌘+X in macOS.Search for ESP-IDF and click the
Uninstall
button.Remove the following folders:
Go to your ${VSCODE_EXTENSION_DIR} and delete the ESP-IDF plugin folder.
${VSCODE_EXTENSION_DIR} is the location of the extension:
Windows:
%USERPROFILE%/.vscode/extensions/espressif.esp-idf-extension-VERSION/
macOS/Linux:
$HOME/.vscode/extensions/espressif.esp-idf-extension-VERSION/
Note
Make sure to replace VERSION with the actual version number of the installed ESP-IDF extension.