ESP32. Getting started with ESP-IDF on IDE Arduino, macOS, Windows, Linux

espressif esp-idf ide arduino macos windows linux gettings start
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp

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.

The framework is constantly evolving … and so is the technical documentation. Be careful to choose the version used before accessing the documentation. Latest is the most recent version.

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

Ouvrir le menu Préférence de l'IE Arduino
2click the button to the right of the Additional Map Manager URL option.

Gestionnaire de cartes de développement de l'IDE Arduino

3In the dialog box that opens, add the link below and click OK

https://dl.espressif.com/dl/package_esp32_index.json
Please note, one line per URL.

link sdk espressif esp32 ide arduino

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

Dépôt vers les cartes ESP32 (ESP-IDF)

5Open the board manager from the Tools menu then board type

2 install sdk espressif esp32 ide arduino

6Search for the SDK with the keyword ESP32. Choose the board package named ESP32 by Espressif Systems then click on install.

Now that the ESP32 boards are managed from the board manager, the libraries can be updated as soon as a new version is available.

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.

install sdk espressif esp32 ide arduino

Check that the ESP32 boards are correctly installed.

The framework supports development boards built around the following chips.

ModuleChipFlash memory

(MB)

PSRAM

(MB)

Antenna
ESP32-WROOM-32ESP32-D0WDQ64PCB
ESP32-WROOM-32DESP32-D0WD4, 8 or 16PCB
ESP32-WROOM-32UESP32-D0WD4, 8 or 16U.FL
ESP32-SOLO-1ESP32-S0WD4PCB
ESP32-WROVER (PCB)ESP32-D0WDQ648PCB
ESP32-WROVER (IPEX)ESP32-D0WDQ648U.FL
ESP32-WROVER-BESP32-D0WD4, 8 or 168PCB
ESP32-WROVER-IBESP32-D0WD4, 8 or 168U.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

Sélectionner une cartes de développement ESP32 sur l'IDE Arduino

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.

ide arduino esp32 demo led blink geekcreit

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.

Download version 2.3

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.

Official documentation

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 PowerShellmacOS 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

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

Click to rate this post!
[Total: 0 Average: 0]

Are you having a problem with this topic?

Maybe someone has already found the solution, visit the forum before asking your question
Ask your question

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp

Did you like this project ? Don't miss any more projects by subscribing to our weekly newsletter!

We will be happy to hear your thoughts

      Leave a Reply

      DIY Projects