Installing ESP-IDF Official Development Framework: Step-by-Step Setup Guide for ESP32

Installing ESP-IDF Official Development Framework: Step-by-Step Setup Guide for ESP32

Oct 11th,2025

ESP32 development board next to the “Installing ESP-IDF Official Development Framework” title, illustrating ESP-IDF installation.

Installing ESP-IDF Official Development Framework

ESP-IDF Installation is an essential step for developers working with the Espressif IoT Development Framework. The ESP-IDF is the official and most powerful software development framework for ESP32, ESP32-S, and ESP32-C series microcontrollers. Designed and maintained by Espressif Systems, the Espressif IoT Development Framework (ESP-IDF) provides developers with professional-grade tools, libraries, and APIs to build robust IoT applications at scale. Unlike simpler platforms such as the Arduino IDE, ESP-IDF gives full access to low-level features, FreeRTOS tasks, and optimized performance configurations that make it ideal for industrial and commercial applications.

Diagram of the ESP-IDF workflow—toolchain and CMake/IDE to project, build to application, then upload via USB from a laptop to an ESP32 board.

Whether you are working on a small IoT prototype or a large-scale automation system, ESP-IDF allows fine-grained control over hardware and networking components. It supports all major operating systems—Linux, Windows, and macOS—ensuring a seamless setup experience regardless of your preferred development environment. In this guide, you will learn how to install ESP-IDF for ESP32 step by step and set up your first project successfully, following this comprehensive ESP-IDF setup guide.This comprehensive package is designed to offer both beginners and seasoned developers a deep dive into the versatile world of the ESP32 Starter Kit documentation.

Prerequisites

Before you begin the ESP32 ESP-IDF setup, make sure your system meets the following requirements:
•Hardware: An ESP32 development board (e.g., ESP32-WROOM, ESP32-S3, or ESP32-C6) and a USB cable for connection.
•Software: Git, Python 3, CMake, and a text editor (VS Code recommended).
•Disk space: At least 1.5 GB of free space.
•Internet access: Required for downloading dependencies and firmware updates.

Installation Methods Overview

There are three main ways to install ESP-IDF ESP32 tools depending on your operating system and preference:
1.Manual Installation: Ideal for developers who want complete control and flexibility — see the [ESP32 Starter Kit documentation] for hands-on examples.
2.ESP-IDF Tools Installer: Recommended for Windows users. For beginners on ESP32, see [Get Started with ESP32]. It automates the installation of toolchains and Python dependencies.

Step-by-Step Installation

ESP-IDF install Linux

To install ESP-IDF on Linux, open your terminal and follow these steps carefully:
1.Update System Packages
sudo apt update && sudo apt upgrade -y
2.Install Dependencies
sudo apt install git wget flex bison gperf python3 python3-venv python3-pip cmake ninja-build ccache libffi-dev libssl-dev dfu-util
3.Clone ESP-IDF Repository
git clone --recursive https://github.com/espressif/esp-idf.git

Terminal output showing the ESP-IDF esp_wifi library being cloned (/home/pi/esp-idf/components/esp_wifi/lib), receiving objects ~98%.

cd esp-idf
4.Run the Installation Script
 ./install.sh

Terminal message “All done! You can now run ./export.sh” at pi@raspberrypi:~/esp-idf prompt, indicating ESP-IDF installation finished.

5.Export Environment Variables .
 ./export.sh

Terminal output after running ./export.sh—ESP-IDF 6.0 activated, IDF_PATH set on Raspberry Pi, environment ready to build with idf.py.

To make ESP-IDF available permanently, add the export line to your .bashrc or .zshrc file:
echo ". $HOME/esp-idf/export.sh" >> ~/.bashrc
You can verify the installation with:
idf.py –versión

Terminal output of idf.py --version at pi@raspberrypi:~/esp-idf, warning about “component_manager_ext” extension, showing ESP-IDF v6.0-dev-2810-g800f141f94.

ESP-IDF install Windows

To install ESP-IDF on Windows, Espressif provides a dedicated installer that simplifies setup for beginners and professionals alike. Follow these steps:
1.Download the ESP-IDF Tools Installer
Visit the official Espressif download page and download the latest ESP-IDF Tools Installer for your system.

ESP-IDF Windows Installer download page showing the Universal Online Installer 2.3.5 for Windows 10/11 (4.37 MB) for ESP32.

2.Run the Installer
During installation, select:
•The latest stable ESP-IDF version
•Your preferred installation directory
•The Python and Git options if not already installed.

Installer window “ESP-IDF Tools 2.3.5” showing ESP-IDF version selection, with v5.5.1 chosen.ESP-IDF Tools 2.3.5 setup “Select Components” screen with Espressif-IDE, PowerShell, and Command Prompt options selected during ESP-IDF installation.

3.Launch ESP-IDF PowerShell Environment
After installation, open the “ESP-IDF PowerShell Environment” shortcut. This terminal automatically configures environment variables (see [ESP32 Starter Kit documentation] for beginner-friendly setup references).
4.Verify Installation
idf.py –versión

Windows terminal showing idf.py --version output with a “component_manager_ext” warning, confirming ESP-IDF v5.5.1.

If you see a version number displayed, your setup was successful.

Environment Setup

After completing the installation, it’s time for ESP-IDF environment setup. You need to initialize the ESP-IDF environment every time you open a new terminal session.
For Linux/macOS, run:
. $HOME/esp-idf/export.sh
For Windows, open the ESP-IDF PowerShell Environment shortcut.
This step sets up the PATH environment so that idf.py, cmake, and other tools can be accessed globally.

PowerShell output after ESP-IDF export on Windows—ESP-IDF 5.5.1 activated, IDF_PATH set, environment ready to run idf.py build.

First Project with ESP-IDF

After you complete the ESP32 ESP-IDF setup, you can now create your first firmware project.
Step 1: Create a New Project
idf.py create-project hello_world
cd hello_world

Windows terminal running idf.py create-project hello_world, confirming the project created at C:\Espressif\frameworks\esp-idf-v5.5.1\hello_world (ESP-IDF).

Copy the project get-started/hello_world to the hello_world folder to run your first ESP-IDF Hello World example.

Step 2: Configure the Project
idf.py set-target esp32
idf.py menuconfig
This opens a project configuration menu (menuconfig) where you can set serial ports, Wi-Fi parameters, or other options.

ESP-IDF menuconfig screen with “Serial flasher config” highlighted in the terminal interface.

Step 3: Build the Project
idf.py build
Step 4: Flash the Project to Your ESP32
idf.py -p /dev/ttyUSB0 flash
(On Windows, replace /dev/ttyUSB0 with your COM port, e.g., COM3.)
Step 5: Monitor Serial Output
idf.py monitor
You should see the message:

ESP-IDF monitor showing the hello_world app running on ESP32, with chip info and restart countdown after flashing.

Common Issues & Troubleshooting

•PATH not configured: Make sure to source export.sh before running idf.py.
•Python errors: Update pip dependencies using python -m pip install --upgrade pip setuptools.
•Permission denied on Linux: Add your user to the dialout group:
sudo usermod -a -G dialout $USER
•Port not found (Windows): Install the latest USB-to-UART drivers (CP210x or CH340).

Updating ESP-IDF

Espressif regularly releases updates that include bug fixes, new features, and support for new chips—see the ESP-IDF Versions & Release Notes.To update:
cd $HOME/esp-idf
git pull
git submodule update --init --recursive
./install.sh

Run idf.py --version to confirm the update. For projects that depend on specific ESP-IDF releases, use tagged branches (e.g., release/v5.1).

Optional Tools & Integrations

A common choice for developers is Visual Studio Code integration guide, which offers complete integration with ESP-IDF.
You can install the Espressif IDF Extension from the VS Code Marketplace, which includes:
•IDF build and flash tasks.
•Serial monitor integration.
•Interactive project configuration GUI.
Alternatively, ESP-IDF can be integrated with Eclipse, CLion, or used in Docker containers for automated builds in CI/CD pipelines.

Conclusion

As the leading ESP32 development framework, ESP-IDF offers developers the tools to unlock the full potential of the ESP32 platform.With ESP-IDF, you gain access to low-level hardware control, FreeRTOS multitasking, and advanced networking features that go far beyond what simplified environments like Arduino can offer. Whether you’re building prototypes or professional IoT products, a proper setup of ESP-IDF ensures stability, scalability, and performance. Once the framework is installed, you’re ready to start creating and deploying robust embedded applications with confidence — this ESP-IDF tutorial gives you everything you need to get started.

Back to News How to Set Up a Raspberry Pi On-Screen Keyboard: Installation, Configuration, and Best Alternatives