ESP-IDF setup on macOS
By Bjørn Borud
This is compact set of instructions to thet the ESP-IDF tools up and running on your mac. These notes are mostly for myself.
Prerequisites
brew install cmake ninja dfu-util python3
Get ESP-IDF
You probably want to get a specific version. In this example we get v4.4.2
. If you want to get a different version, you should have a look at https://github.com/espressif/esp-idf/releases and pick the release you want.
mkdir -p ~/esp
cd ~/esp
git clone -b v4.4.2 --recursive <https://github.com/espressif/esp-idf.git> esp-idf
Install the tooling
This will install the tooling into $HOME/.espressif
.
cd ~/esp/esp-idf
./install.sh all
Using the installed tooling
Once the tooling is installed you need to set up the environment variables.
. ./esp/esp-idf/export.sh
To make this a bit easier to remember, add the following to your .bash_profile
or similar:
alias idf='. $HOME/esp/esp-idf/export.sh'
Then just type idf
in the shell whenever you want the environment to be populated correctly for ESP-IDF development.