Table of Contents

ESP-IDF

EPS32 development environment.

Previously tested on Raspberry Pi 3 (armv7l / python 3.7.3)

Recently tested on Raspberry Pi 400 (aarch64 / python 3.9.2).

ESP-IDF is truly awful.

Setup

Install various dependencies.

apt update
apt full-upgrade
apt install build-essential cmake git wget flex bison gperf python3 python3-venv python3-pip python3-setuptools python3-pyparsing ninja-build ccache libffi-dev libssl-dev dfu-util

Python3 will need to be the default version.

User

Create a user for the home of the dev kit.

useradd -d /home/esp -m esp

Append paths to .profile

vi ~esp/.profile
IDF_PATH="$HOME/esp-idf"
IDF_TOOLS_PATH="$HOME/esp-idf"

Install

Login as user esp

/bin/su - esp

Clone dev kit into home dir.

git clone --recursive https://github.com/espressif/esp-idf

Run installation script.

cd esp-idf
sh install.sh

Finalise installation

. ~/esp-idf/export.sh

If it complains about openocd…

/usr/bin/python3 /home/esp/esp-idf/tools/idf_tools.py export --prefer-system

Save the configuration

echo ". ~/esp-idf/export.sh" >> ~/.profile

Logout from user esp

exit

Test

Login as user esp

/bin/su - esp

Enter the hello world example dir

cd ~/esp-idf/examples/get-started/hello_world 

Build

idf.py build

Resources

MCU reference manual

Get Started with ESP-IDF

First project with ESP-IDF