Skip to content

ESP-IDF Setup

This tutorial walks through installing ESP-IDF inside Visual Studio Code. By the end, you will have a working toolchain that can compile and flash firmware to the ESP32-P4.

Before installing VSCode and the ESP-IDF extension, your operating system needs certain build dependencies.

Install the required system packages:

Terminal window
sudo apt update
sudo apt install git wget flex bison gperf python3 python3-pip \
python3-venv cmake ninja-build ccache libffi-dev libssl-dev \
dfu-util libusb-1.0-0

See the full list at Espressif’s Linux prerequisites.

  1. Download Visual Studio Code from code.visualstudio.com.

  2. Run the installer for your platform.

  3. Launch VSCode and verify it opens correctly.

  1. Open VSCode and navigate to the Extensions panel (Ctrl+Shift+X / Cmd+Shift+X).

  2. Search for “ESP-IDF” and install the extension published by Espressif Systems.

  3. After installation, the ESP-IDF setup wizard should open automatically. If it does not, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run ESP-IDF: Configure ESP-IDF Extension.

  4. Select EXPRESS install mode. This is the simplest path — it downloads and configures everything for you.

  5. When prompted for the ESP-IDF version, select v5.3.1 or later (v5.4.x is recommended if available).

  6. Choose an installation directory. The defaults are usually fine:

    • Linux/macOS: ~/esp/esp-idf
    • Windows: C:\Espressif\frameworks\esp-idf
  7. Click Install and wait for the process to complete.

  1. Open the Command Palette and run ESP-IDF: Show Examples Projects.

  2. Select hello_world from the get-started category.

  3. Choose a directory to create the project in.

  4. At the bottom status bar, click the chip target selector and choose ESP32-P4.

  5. Open the integrated terminal (Ctrl+`) and run:

    Terminal window
    idf.py --version

    You should see the ESP-IDF version (v5.3.1+).

The ESP32-P4 features a dual-core RISC-V processor. The current ESP-IDF SDK configures the CPU clock at 360 MHz by default. While the silicon supports 400 MHz, full SDK support for that clock rate is not yet available. For most workloads the difference is negligible, and 360 MHz provides stable operation across all supported peripherals.

Your toolchain is ready. Proceed to First Flash to connect the board and upload your first program.