Skip to main content

ESP-IDF Setup

Espressif Logo

What is ESP-IDF?

ESP-IDF (Espressif IoT Development Framework) is the official, low-level development framework for ESP32, ESP32-S, ESP32-C, and ESP32-H series chips. It gives you full access to FreeRTOS, Wi-Fi/BLE stacks, and hardware peripherals — ideal once you've outgrown the Arduino framework.

Prerequisites

  • A computer running Windows, macOS, or Linux.
  • Git installed and available on your PATH.
  • An ESP32-based board and a USB data cable.

Supported Targets

Chipidf.py set-target value
ESP32esp32
ESP32-S2esp32s2
ESP32-S3esp32s3
ESP32-C3esp32c3
ESP32-C6esp32c6

⚠️ ESP8266 is not ESP-IDF compatible. It uses an older, separate Espressif SDK. Use the ESP8266 Arduino IDE guide instead.

  1. Install Visual Studio Code.
  2. Open the Extensions view and install the Espressif IDF extension.
  3. Run ESP-IDF: Configure ESP-IDF Extension from the command palette and choose Express install.
  4. Pick the latest stable ESP-IDF release and let the extension download the toolchain and Python environment.

Option 2: Command-Line Install

  1. Clone the IDF repository:
git clone -b v5.3 --recursive https://github.com/espressif/esp-idf.git
  1. Run the install script for your platform:
cd esp-idf
./install.sh esp32
  1. Source the environment in every new terminal session:
. ./export.sh

Build, Flash & Monitor

From your project directory:

idf.py set-target <target> # e.g. esp32, esp32s2, esp32s3, esp32c3, esp32c6
idf.py build
idf.py -p <PORT> flash monitor

idf.py monitor opens a serial console — press Ctrl+] to exit.

Next Steps

➡️ Get Started with ESP32


Comments