The ESP-IDF development kit (for Espressif IoT Development Framework) for the Arduino IDE allows to develop code for all development boards based on ESP32. ESP-IDF is very easy to install from the library manager of the Arduino IDE. It is also possible to use the ESP-IDF framework from the command line from the Terminal (macOS or Linux) and PowerShell (Windows).
The Espresso Development Kit (SDK) for ESP32 boards is available on GitHub. It is compatible with the Arduino IDE for macOS, Windows, Linux 32-bit, 64-bit and ARM chips (Raspberry Pi, Orange Pi, etc …). Very detailed documentation is available here.
Install the ESP-IDF Framework for ESP32 on the Arduino IDE
Now that the ESP-IDF framework for ESP32 development boards is directly available from the board manager of the Arduino IDE, the installation procedure is the same whatever the operating system (Windows 10, macOS, Linux, Raspbian , Armbian …)
1Open the preferences panel from the Arduino menu
2click the button to the right of the Additional Map Manager URL option.
3In the dialog box that opens, add the link below and click OK
https://dl.espressif.com/dl/package_esp32_index.json
There is also a link to the version under development (release). This version is not recommended for production. It makes it possible to evaluate the new functionalities under development.
https://dl.espressif.com/dl/package_esp32_dev_index.json
4The link to the repository is added to the list. Close the settings by clicking OK
5Open the board manager from the Tools menu then board type
6Search for the SDK with the keyword ESP32. Choose the board package named ESP32 by Espressif Systems then click on install.
Wait for the framework to be downloaded and installed from the internet. The installation process is fully automated. There is absolutely nothing more can be done.
Check that the ESP32 boards are correctly installed.
The framework supports development boards built around the following chips.
Module | Chip | Flash memory (MB) | PSRAM (MB) | Antenna |
---|---|---|---|---|
ESP32-WROOM-32 | ESP32-D0WDQ6 | 4 | – | PCB |
ESP32-WROOM-32D | ESP32-D0WD | 4, 8 or 16 | – | PCB |
ESP32-WROOM-32U | ESP32-D0WD | 4, 8 or 16 | – | U.FL |
ESP32-SOLO-1 | ESP32-S0WD | 4 | – | PCB |
ESP32-WROVER (PCB) | ESP32-D0WDQ6 | 4 | 8 | PCB |
ESP32-WROVER (IPEX) | ESP32-D0WDQ6 | 4 | 8 | U.FL |
ESP32-WROVER-B | ESP32-D0WD | 4, 8 or 16 | 8 | PCB |
ESP32-WROVER-IB | ESP32-D0WD | 4, 8 or 16 | 8 | U.FL |
Once the installation is complete, there is no need to restart the Arduino IDE.
Open the Tools menu and then the Board type submenu. Scroll down, if the installation was successful you should be able to select your ESP32 development board from the list.
If you can’t find your board in the list, you can try a generic configuration, for example:
- ESP32 Dev Module
- ESP32 Wrover Module
- NodeMCU-32S
The list of boards changes with each update
Check that everything is working by flashing an LED
The ESP32 is programmed exactly like an ESP8266. Here we will simply check that everything is correctly installed. Create a new project and paste the following code which flashes an Led connected between pin 15 and the GND.
/*
* ESP32 Dev Board Test
* Led blinking
* projetsdiy.fr - diyprojects.io
*/
int ledPin = 15;
void setup()
{
pinMode(ledPin, OUTPUT);
Serial.begin(115200);
}
void loop()
{
Serial.println("Hello ESP32!");
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
}
From the list of boards, select ESP32 Dev Module. The modules generally support a download speed of 921600 bauds which is very appreciable.
Install ESP-IDF command line tools
The development framework is also available in the form of a toolchain, command line compilation, configuration and debugging tools accessible from the Terminal (macOS and Linux) or PowerShell (Windows).
Install ESP-IDF on Windows
An installation utility named ESP-IDF Tools Installer is available on Windows.
The installer includes the compilers, OpenOCD, cmake and Ninja build tool. The installer can also download and run installers for Python 3.7 and Git for Windows if they are not already installed on the computer.
Install on macOS and Linux
By default, the tools should be installed in the ~/esp folder
Open a Terminal and run these commands to download the repository
mkdir ~/esp
cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
then start the installation
cd ~/esp/esp-idf
./install.sh
Once the installation is complete, it is necessary to declare the paths in the environment variables
. $HOME/esp/esp-idf/export.sh
Common mistakes
-bash: idf.py: command not found
The path to the ESP-IDF directory has not been correctly declared
Run the following command depending on the environment
Windows PowerShell | macOS or Linux Terminal |
.$HOME/esp/esp-idf/export.ps1 | . $HOME/esp/esp-idf/export.sh |
Some ESP32 tutorials and projects
Ready to get started, here are other tutorials and projects based on ESP32
- ESP32, GPIO pins and associated functions. I/O, PWM, RTC, I2C, SPI, ADC, DAC
- M5Stack Atomic GPS. ESP32 TinyGPS++ tracker, GPX export on SD card, visualization on Google Maps or VSCode
- How to store data on a micro SD card. Arduino code compatible ESP32, ESP8266
- Getting started Arduino. Receive commands from the serial port (ESP32 ESP8266 compatible)
- C++ functions print•println•printf•sprintf for Arduino ESP32 ESP8266. Combine•format → serial port
- C++ String functions. concat•c_srt•indexOf•replace•subString… for Arduino, ESP32, ESP8266
- ESP32. How to connect to local WiFi network with Arduino code
- How to assign a fixed IP to an ESP32 ESP8266 or ESP01 project
- ESP32. How to use Timers and Alarms with Arduino Code
- ESP32. How to use external interrupts with Arduino code
- ESP32. How to use GPIO digital IO with Arduino code
- ESP32. How to use the WiFiManager library to manage WiFi connections
- ESP32. Store temporary data in RTC memory during deep-sleep
- ESP32. Arduino code for Deep Sleep and wake-ups (Timer, Touch Pad, GPIO …)
- Get started with ArduinoJSON v6, Arduino library for handling JSON objects
- ESP32. Access SPIFFS files in FTP with the ESP8266FtpServer library
- ESP32 Sketch data upload for Arduino IDE. Upload SPIFFS files to flash memory
- ESP32. Get started with the SPIFFS.h library to read, write, modify files
- ESP32. Getting started with ESP-IDF on IDE Arduino, macOS, Windows, Linux
- #Guide: Which ESP32 development board to choose to develop DIY connected objects
Updates
1/09/2020 install ESP-IDF on macOS, Windows or Linux
3/06/2019 New SDK installation procedure compatible with all operating systems from the Arduino IDE board manager
- ESP32, GPIO pins and associated functions. I/O, PWM, RTC, I2C, SPI, ADC, DAC
- M5Stack Atomic GPS. ESP32 TinyGPS++ tracker, GPX export on SD card, visualization on Google Maps or VSCode
- How to store data on a micro SD card. Arduino code compatible ESP32, ESP8266
- Getting started Arduino. Receive commands from the serial port (ESP32 ESP8266 compatible)
- C++ functions print•println•printf•sprintf for Arduino ESP32 ESP8266. Combine•format → serial port