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

Debian bullseye has python 3 but on buster python 3 will need to be the default version.

update-alternatives --remove-all python
update-alternatives --install /usr/bin/python python /usr/bin/python3 2
update-alternatives --install /usr/bin/python python /usr/bin/python2 1
update-alternatives --config python
python -V
Python 3.7.3

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

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information