ESP32 — ESP-IDF v6
ESP-IDF v6 — Windows Setup
Install ESP-IDF v6 on Windows using the ESP-IDF Installation Manager (EIM). EIM handles all dependencies automatically — no manual Python environments or PATH configuration needed.
Prerequisites
Before starting, make sure you have:
- Windows 10 64-bit (version 1903 or later) or Windows 11
- At least 4 GB of free disk space (8 GB recommended)
- A stable internet connection for the initial download (~1.5 GB)
- Git for Windows installed (git-scm.com)
Use PowerShell, not Command Prompt
All commands in this guide should be run in Windows PowerShell (or Windows Terminal with PowerShell). Command Prompt (cmd.exe) may not work correctly with ESP-IDF path setup.
Step 1 — Install EIM via WinGet
Open PowerShell as Administrator and run:
# Install EIM with a graphical interface
winget install Espressif.EIM
# Or install the CLI-only version (for headless/automation use)
winget install Espressif.EIM-CLI
WinGet not installed?
WinGet is included by default in Windows 11. For Windows 10, install the App Installer package from the Microsoft Store, or download EIM directly from dl.espressif.com.
Verify EIM installed correctly:
eim --version
Step 2 — Install ESP-IDF v6 via EIM GUI
Option A: Using the EIM GUI (Recommended for first-time users)
- Open the EIM application from the Start Menu
- Click "New Installation"
- Select ESP-IDF v6.0.0 (or the latest v6.x release) from the version dropdown
- Choose your target chip (e.g.,
ESP32,ESP32-S3,ESP32-C6) - Accept the default installation path (
C:\Users\<you>\.espressif\) - Click Install and wait for the process to complete (~10–20 minutes)
Option B: Using the EIM CLI
# Install ESP-IDF v6.0 targeting ESP32
eim install --version v6.0 --target esp32
# For ESP32-S3
eim install --version v6.0 --target esp32s3
# For ESP32-C6
eim install --version v6.0 --target esp32c6
Step 3 — Activate the ESP-IDF Environment
EIM creates a PowerShell activation script. Run it each time you open a new terminal session, or add it to your PowerShell profile.
# Activate ESP-IDF environment for the current session
. $env:USERPROFILE\.espressif\esp-idf-v6.0\export.ps1
To verify the environment is active:
idf.py --version
# Expected output: ESP-IDF v6.0.x
Environment is session-scoped
You must run the export.ps1 script every time you open a new PowerShell window. To avoid this, add it to your PowerShell profile (see the VS Code Integration guide for a permanent setup).
Step 4 — Install USB Drivers
Connect your ESP32 board via USB. If Windows does not recognize it automatically:
- Open Device Manager (
Win + X→ Device Manager) - Look for an unknown device under Other Devices
- Right-click → Update Driver → Search automatically
If auto-install fails, manually install the driver for your board's USB chip:
| USB Chip | Driver |
|---|---|
| CP2102 / CP2104 | Silicon Labs CP210x |
| CH340 / CH341 | CH341SER.exe |
| FTDI FT232 | FTDI VCP |
After driver installation, your board will appear as COMx in Device Manager (e.g., COM3).
Step 5 — Verify the Installation
Create a test project to confirm everything works:
# First, activate the environment
. $env:USERPROFILE\.espressif\esp-idf-v6.0\export.ps1
# Copy the hello_world example
cd C:\Users\<YourName>\Documents
idf.py create-project-from-example "esp_system:hello_world"
cd hello_world
# Set target chip (change to esp32s3 or esp32c6 if needed)
idf.py set-target esp32
# Build the project
idf.py build
A successful build ends with:
Project build complete. To flash, run:
idf.py flash
Step 6 — Flash and Monitor
Connect your board and identify its COM port from Device Manager, then:
# Flash and open the serial monitor in one command
idf.py -p COM3 flash monitor
# To exit the monitor: press Ctrl + ]
You should see:
Hello world!
This is esp32 chip with 2 CPU core(s), WiFi/BT/BLE, silicon revision v3.1, 4MB external flash
Restarting in 10 seconds...
🎉 Your ESP-IDF v6 Windows environment is ready!
Troubleshooting
idf.py not found after running export.ps1
Make sure you ran the script with . (dot-space) at the beginning — this sources it into the current shell:
. $env:USERPROFILE\.espressif\esp-idf-v6.0\export.ps1
cmake version error during build
EIM should install CMake automatically. If you see a CMake version error, open EIM and use "Repair Installation" to reinstall the build tools.
Port access denied
Close any other applications using the COM port (Arduino IDE, PuTTY, etc.) before running idf.py flash.

