You will need to install ESP-IDF (ESP32 SDK). You can follow the steps below or the detailed instruction on https://docs.espressif.com/projects/esp-idf/en/stable/get-started/#setup-toolchain.
-
As a first step, download ESP32 toolchain: https://docs.espressif.com/projects/esp-idf/en/stable/get-started/#setup-toolchain
-
Get ESP-IDF: Export the environment variable IDF_PATH:
export IDF_PATH=$HOME/<esp-idf>
Before compiling, you need to alter several settings in menuconfig. Make sure you save
this file, as it will be used in the build
section to configure WiFi settings.
- Open the menuconfiguration with the command
make menuconfig
- Scroll through each section of the menu, and make these changes:
- Serial flasher config
- Default serial port = /dev/tty.usbserial-
- WiFi Configuration
- WiFi SSID = YOUR SSID
- WiFi Password = YOUR PASSWORD
- Set path to esp-idf SDK
export IDF_PATH=$HOME/<esp-idf>
- Build the example:
make -j4
- Flash the example and open the serial terminal:
make flash && make monitor