MacOS Installation#
The installation process for other operating systems like Linux and Windows is similar to the steps provided for macOS below.
ESP32’s idf.py
#
MacOS Environment#
Tested on MacBook Air M1 2020 with macOS Sonoma v14.5.
You can install the ESP32 development environment using the terminal or Visual Studio Code. The terminal installation method is recommended and detailed below.
1. Install ESP-IDF#
To set up the ESP-IDF environment on macOS, follow these steps:
For detailed instructions, see the official documentation: ESP-IDF MacOS Setup.
Install required packages:
brew install cmake ninja dfu-utilClone the ESP-IDF repository:
git clone --recursive https://github.com/espressif/esp-idf.gitNavigate to the ESP-IDF directory:
cd esp-idfRun the installation script for ESP32:
./install.sh esp32
Add an alias to your
.zshrc
file for easy access toidf.py
:echo "alias get_idf='. $(pwd)/export.sh'" >> ~/.zshrcSource the updated profile:
source ~/.zshrc
Note:
After the setup, run the following command in each project to activate idf.py
:
get_idf
2. Install Additional Packages#
You may also need the following packages to work with ESP-IDF:
brew install gcc make pkg-config arm-none-eabi-gcc openocd bear screen qemu
Important:
gdb
cannot be installed on macOS, so you’ll need to use lldb
as an alternative.
GNU Make Utility: GNU
make
is installed asgmake
. If you need to use it asmake
, add the following line to your.zshrc
to update your PATH:export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
Sphinx#
Sphinx is used to generate HTML documentation (not Doxygen). You don’t need to install Sphinx unless you’re contributing to the documentation.
1. Install Sphinx#
To install Sphinx and the required theme:
pip install sphinx sphinx-book-theme