Downloadable Tools
ESP-IDF build process relies on a number of tools: cross-compiler toolchains, CMake build system, and others.
Installing the tools using an OS-specific package manager (like apt, yum, brew, etc.) is the preferred method when the required version of the tool is available. This recommendation is reflected in the Getting Started guide. For example, on Linux and macOS it is recommended to install CMake using an OS package manager.
However, some of the tools are IDF-specific and are not available in OS package repositories. Furthermore, different versions of ESP-IDF require different versions of the tools to operate correctly. To solve these two problems, ESP-IDF provides a set of scripts for downloading and installing the correct versions of tools, and exposing them in the environment.
The rest of the document refers to these downloadable tools simply as “tools”. Other kinds of tools used in ESP-IDF are:
Python scripts bundled with ESP-IDF (such as
idf.py
)Python packages installed from PyPI.
The following sections explain the installation method, and provide the list of tools installed on each platform.
备注
This document is provided for advanced users who need to customize their installation, users who wish to understand the installation process, and ESP-IDF developers.
If you are looking for instructions on how to install the tools, see the Getting Started Guide.
Tools metadata file
The list of tools and tool versions required for each platform is located in tools/tools.json. The schema of this file is defined by tools/tools_schema.json.
This file is used by tools/idf_tools.py script when installing the tools or setting up the environment variables.
Tools installation directory
IDF_TOOLS_PATH
environment variable specifies the location where the tools are to be downloaded and installed. If not set, IDF_TOOLS_PATH
defaults to HOME/.espressif
on Linux and macOS, and %USER_PROFILE%\.espressif
on Windows.
Inside IDF_TOOLS_PATH
, the scripts performing tools installation create the following directories:
dist
— where the archives of the tools are downloaded.tools
— where the tools are extracted. The tools are extracted into subdirectories:tools/TOOL_NAME/VERSION/
. This arrangement allows different versions of tools to be installed side by side.
GitHub Assets Mirror
Most of the tools downloaded by the tools installer are GitHub Release Assets, which are files attached to a software release on GitHub.
If GitHub downloads are inaccessible or slow to access, it’s possible to configure a GitHub assets mirror.
To use Espressif’s download server, set the environment variable IDF_GITHUB_ASSETS
to dl.espressif.com/github_assets
. When the install process is downloading a tool from github.com
, the URL will be rewritten to use this server instead.
Any mirror server can be used provided the URL matches the github.com
download URL format: the install process will replace https://github.com
with https://${IDF_GITHUB_ASSETS}
for any GitHub asset URL that it downloads.
备注
The Espressif download server doesn’t currently mirror everything from GitHub, it only mirrors files attached as Assets to some releases as well as source archives for some releases.
idf_tools.py
script
tools/idf_tools.py script bundled with ESP-IDF performs several functions:
install
: Download the tool into${IDF_TOOLS_PATH}/dist
directory, extract it into${IDF_TOOLS_PATH}/tools/TOOL_NAME/VERSION
.install
command accepts the list of tools to install, inTOOL_NAME
orTOOL_NAME@VERSION
format. Ifall
is given, all the tools (required and optional ones) are installed. If no argument orrequired
is given, only the required tools are installed.download
: Similar toinstall
but doesn’t extract the tools. An optional--platform
argument may be used to download the tools for the specific platform.export
: Lists the environment variables which need to be set to use the installed tools. For most of the tools, settingPATH
environment variable is sufficient, but some tools require extra environment variables.The environment variables can be listed in either of
shell
orkey-value
formats, set by--format
parameter:shell
produces output suitable for evaluation in the shell. For example,export PATH="/home/user/.espressif/tools/tool/v1.0.0/bin:$PATH"
on Linux and macOS, and
set "PATH=C:\Users\user\.espressif\tools\v1.0.0\bin;%PATH%"
on Windows.
备注
Exporting environment variables in Powershell format is not supported at the moment.
key-value
format may be used instead.The output of this command may be used to update the environment variables, if the shell supports this. For example:
eval $($IDF_PATH/tools/idf_tools.py export)
key-value
produces output in VARIABLE=VALUE format, suitable for parsing by other scripts:PATH=/home/user/.espressif/tools/tool/v1.0.0:$PATH
Note that the script consuming this output has to perform expansion of
$VAR
or%VAR%
patterns found in the output.
list
: Lists the known versions of the tools, and indicates which ones are installed.check
: For each tool, checks whether the tool is available in the system path and inIDF_TOOLS_PATH
.
Install scripts
Shell-specific user-facing scripts are provided in the root of ESP-IDF repository to facilitate tools installation. These are:
install.bat
for Windows Command Promptinstall.ps1
for Powershellinstall.sh
for Bash
Aside from downloading and installing the tools into IDF_TOOLS_PATH
, these scripts prepare a Python virtual environment, and install the required packages into that environment.
Export scripts
Since the installed tools are not permanently added into the user or system PATH
environment variable, an extra step is required to use them in the command line. The following scripts modify the environment variables in the current shell to make the correct versions of the tools available:
export.bat
for Windows Command Promptexport.ps1
for Powershellexport.sh
for Bash
备注
To modify the shell environment in Bash, export.sh
must be “sourced”: . ./export.sh
(note the leading dot and space).
export.sh
may be used with shells other than Bash (such as zsh). However in this case the IDF_PATH
environment variable must be set before running the script. When used in Bash, the script will guess the IDF_PATH
value from its own location.
In addition to calling idf_tools.py
, these scripts list the directories which have been added to the PATH
.
Other installation methods
Depending on the environment, more user-friendly wrappers for idf_tools.py
are provided:
IDF Tools installer for Windows can download and install the tools. Internally the installer uses
idf_tools.py
.Eclipse plugin for ESP-IDF includes a menu item to set up the tools. Internally the plugin calls
idf_tools.py
.Visual Studio Code extension for ESP-IDF includes an onboarding flow. This flow helps setting up the tools. Although the extension does not rely on
idf_tools.py
, the same installation method is used.
Custom installation
Although the methods above are recommended for ESP-IDF users, they are not a must for building ESP-IDF applications. ESP-IDF build system expects that all the necessary tools are installed somewhere, and made available in the PATH
.
List of IDF Tools
xtensa-esp32-elf
Toolchain for Xtensa (ESP32) based on GCC
License: GPL-3.0-with-GCC-exception
More info: https://github.com/espressif/crosstool-NG
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
required |
SHA256: 9edd1e77627688f435561922d14299f6a0021ba1f6ff67e472e1108695a69e53 |
linux-arm64 |
required |
SHA256: 3a21a3e310e6b1e7d7bed1f3e59698a5bd29ed3a5ca79fba9265d7dd2f1e0cd2 |
linux-armel |
required |
SHA256: 89313c4c1d8db1b01624f31b58bf3fbe527160569828ac4301e9daa75c52716d |
linux-armhf |
required |
SHA256: ec07a9c75a0aa4b86496cacf2034154cd4a693b6f317c66a4a122c71fd04a518 |
linux-i686 |
required |
SHA256: a1f165a836f175daa6fbfde4ca99cb93b377f021fbfc41f79a700bd4df965a9a |
macos |
required |
SHA256: dda3d7a43efd995d9a51d5a5741626dbf915df46078aef0b5aea7163ac82398b |
macos-arm64 |
required |
SHA256: dda3d7a43efd995d9a51d5a5741626dbf915df46078aef0b5aea7163ac82398b |
win32 |
required |
SHA256: fd147592928ef2d7092ba34b01ecd776fe26ba3d7e3f9b6b215a3b46e981ee2c |
win64 |
required |
SHA256: 9395315c07de0b9f05c9a6616ba1f05e76ab651053f2f40479163a8e03cfa830 |
xtensa-esp32s2-elf
Toolchain for Xtensa (ESP32-S2) based on GCC
License: GPL-3.0-with-GCC-exception
More info: https://github.com/espressif/crosstool-NG
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
required |
SHA256: a32451a8edc1104b83cd9971178e61826e957d7db9ad9f81798a8969fd5a954e |
linux-arm64 |
required |
SHA256: 2ac2c94a533a99a091d2159c678c611c712c494b5f68d97913254712047260f9 |
linux-armel |
required |
SHA256: da49afee1e2e03eaab3f492718789442d33b562800e2a892679f95b50be24d14 |
linux-armhf |
required |
SHA256: f2b9b89522f28547c8725a54c4e57e8a35dac56edc26aa8cd607c87a050249ac |
linux-i686 |
required |
SHA256: 36d3c4990a5feb68aa8534463bc9e8ee367fe23886f78e1d726f4411c7571462 |
macos |
required |
SHA256: de9af641678c93775e932ee5ec4f478f8925cfc1ebc22e41adc4fb85430a0c35 |
macos-arm64 |
required |
SHA256: de9af641678c93775e932ee5ec4f478f8925cfc1ebc22e41adc4fb85430a0c35 |
win32 |
required |
SHA256: ccf08afe60046f87b0e81ca17dc5073eda68ab5e7522c163dd5b583d713b7b39 |
win64 |
required |
SHA256: 37c91490b8fc75e638c23785e261eaf553be2dcd106cf6cff5b76981fa02955b |
xtensa-esp32s3-elf
Toolchain for Xtensa (ESP32-S3) based on GCC
License: GPL-3.0-with-GCC-exception
More info: https://github.com/espressif/crosstool-NG
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
required |
SHA256: 59b271d014ff3915b6db1b43b610a45eea15fe5d6877d12cae8a191cc996ed37 |
linux-arm64 |
required |
SHA256: 7051b32483e61f98606d71c98e372929428a5165df791dcd5830ed9517763152 |
linux-armel |
required |
SHA256: 48c8dbbf96eec691a812327dc580042d9718fe989e60c2111ebfd692ac710081 |
linux-armhf |
required |
SHA256: efc037db5b3565d907c611ef9d17f156080949c0382feeaec86ed7b54d9fa2ae |
linux-i686 |
required |
SHA256: 552dca3f4302ab7ca88a934b0391200198c9d10a4d8ac413fe604cbf8601f950 |
macos |
required |
SHA256: e5af78f05d3af07617805d06ebb45ff2fe9b6aed6970a84c35eea28a5d8d5e53 |
macos-arm64 |
required |
SHA256: e5af78f05d3af07617805d06ebb45ff2fe9b6aed6970a84c35eea28a5d8d5e53 |
win32 |
required |
SHA256: 1b70163acccc5655449de1d149427a54f384156bd35816ec60c422d76d033f05 |
win64 |
required |
SHA256: 58e58575d1938879fd51e822181e54bcb343aa846eb3fca8f616c2cde7bd0041 |
xtensa-clang
LLVM for Xtensa (ESP32, ESP32-S2) based on clang
License: Apache-2.0
More info: https://github.com/espressif/llvm-project
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
optional |
SHA256: d62d9234c702a86ed510777125ee97458204e28877806a73f9de5e41d7b65716 |
macos |
optional |
SHA256: 6e7413e5fa515e403859ecf5301bdcdc3f8bf12c5de9aecaa11e9f17f32b05db |
macos-arm64 |
optional |
SHA256: 6e7413e5fa515e403859ecf5301bdcdc3f8bf12c5de9aecaa11e9f17f32b05db |
win64 |
optional |
SHA256: e056366959c722367e4144076c5383bd417ea199db5658bb7bb6c95b9aca014b |
riscv32-esp-elf
Toolchain for 32-bit RISC-V based on GCC
License: GPL-3.0-with-GCC-exception
More info: https://github.com/espressif/crosstool-NG
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
required |
SHA256: 179cbad579790ad35e0f414a18d90017c0f158c397022411a8e9867db2174f15 |
linux-arm64 |
required |
SHA256: fb339d476c79c76db8f903b265cab6bb6950d5ed954dec644445252d3378023c |
linux-armel |
required |
SHA256: 51a6296d8334b7452dba44b2b62e87afd7fd1c74bafa1aa29b1f4ab72cb9e5e0 |
linux-armhf |
required |
SHA256: faa723e2fe84154ea8081ef204d9db51c5b7e5702497dff4f3b33e250e42f776 |
linux-i686 |
required |
SHA256: fef60f7ef37ffaa50416d8f244cdbd710d6729dae41ef06c4ec0e50a1f3b7dd7 |
macos |
required |
SHA256: 4aacc1742a76349d790b1ac8e9e9d963daefda5346dbd6741cfe8e7a35a44e4e |
macos-arm64 |
required |
SHA256: 4aacc1742a76349d790b1ac8e9e9d963daefda5346dbd6741cfe8e7a35a44e4e |
win32 |
required |
SHA256: eb2a442d7f551ebeb842995ec372ec4b364314ca2d7aae779399a74972f7d6bc |
win64 |
required |
SHA256: f5607e5187317d521f0474cade83f8eb590f2d165d95c3779b6ce11fbac21d1f |
esp32ulp-elf
Toolchain for ESP32 ULP coprocessor
License: GPL-2.0-or-later
More info: https://github.com/espressif/binutils-esp32ulp
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
required |
SHA256: 3016c4fc551181175bd9979869bc1d1f28fa8efa25a0e29ad7f833fca4bc03d7 |
linux-armel |
required |
SHA256: 88967c086a6e71834282d9ae05841ee74dae1815f27807b25cdd3f7775a47101 |
macos |
required |
SHA256: a35d9e7a0445247c7fc9dccd3fbc35682f0fafc28beeb10c94b59466317190c4 |
macos-arm64 |
required |
SHA256: a35d9e7a0445247c7fc9dccd3fbc35682f0fafc28beeb10c94b59466317190c4 |
win32 |
required |
SHA256: bade309353a9f0a4e5cc03bfe84845e33205f05502c4b199195e871ded271ab5 |
win64 |
required |
SHA256: bade309353a9f0a4e5cc03bfe84845e33205f05502c4b199195e871ded271ab5 |
esp32s2ulp-elf
Toolchain for ESP32-S2 and ESP32-S3 ULP coprocessors
License: GPL-2.0-or-later
More info: https://github.com/espressif/binutils-esp32ulp
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
required |
SHA256: df7b2ff6c7c718a7cbe3b4b6dbcd68180d835d164d1913bc4698fd3781b9a466 |
linux-armel |
required |
SHA256: 893b213c8f716d455a6efb2b08b6cf1bc34d08b78ee19c31e82ac44b1b45417e |
macos |
required |
SHA256: 5a9bb678a5246638cbda303f523d9bb8121a9a24dc01ecb22c21c46c41184155 |
macos-arm64 |
required |
SHA256: 5a9bb678a5246638cbda303f523d9bb8121a9a24dc01ecb22c21c46c41184155 |
win32 |
required |
SHA256: 587de59fbb469a39f96168ae3eaa9f06b2601e6e0543c87eaf1bd97f23e5c4ca |
win64 |
required |
SHA256: 587de59fbb469a39f96168ae3eaa9f06b2601e6e0543c87eaf1bd97f23e5c4ca |
cmake
CMake build system
On Linux and macOS, it is recommended to install CMake using the OS package manager. However, for convenience it is possible to install CMake using idf_tools.py along with the other tools.
License: BSD-3-Clause
More info: https://github.com/Kitware/CMake
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
optional |
https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-linux-x86_64.tar.gz SHA256: f3c654b2e226b9d43369e0bd8487c51618d4dbe5a1af929dd32af7e6ca432d60 |
linux-arm64 |
optional |
https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-linux-aarch64.tar.gz SHA256: 74062efddeb935bce3d33694a4db534cef9a650f77a9a153a9f217d9dc385c75 |
linux-armel |
optional |
https://dl.espressif.com/dl/cmake/cmake-3.23.1-Linux-armv7l.tar.gz SHA256: aa6079237e16cc3b389479b2f7279d07e57f6aedad520e2b3014ef97fb906466 |
macos |
optional |
https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-macos-universal.tar.gz SHA256: f794ed92ccb4e9b6619a77328f313497d7decf8fb7e047ba35a348b838e0e1e2 |
macos-arm64 |
optional |
https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-macos-universal.tar.gz SHA256: f794ed92ccb4e9b6619a77328f313497d7decf8fb7e047ba35a348b838e0e1e2 |
win32 |
required |
https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-windows-x86_64.zip SHA256: 9b509cc4eb7191dc128cfa3f2170036f9cbc7d9d5f93ff7fafc5b2d77b3b40dc |
win64 |
required |
https://github.com/Kitware/CMake/releases/download/v3.23.1/cmake-3.23.1-windows-x86_64.zip SHA256: 9b509cc4eb7191dc128cfa3f2170036f9cbc7d9d5f93ff7fafc5b2d77b3b40dc |
openocd-esp32
OpenOCD for ESP32
License: GPL-2.0-only
More info: https://github.com/espressif/openocd-esp32
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
required |
SHA256: 8d49845d7f0f2f9178e72c694a76e39a6ef3dd219cfccbfc2b8e09fc8d8f1c6e |
linux-arm64 |
required |
SHA256: 584e4d10d6efb9985f4212542cfa2a92f89c747b54035bac8aa75b5f5e768e28 |
linux-armel |
required |
SHA256: 49189d645d8c482b81d1870766a5795da30a79b352d98803f0054f200174fc5a |
linux-armhf |
required |
SHA256: a538a2b98fd09fb548a9dbfa0b5155364273e1ae37e944d1abfa04cc4e6e0ba2 |
macos |
required |
SHA256: d718bc24087f796ff06f49fb9052183b302402ab775460b1ebdfc4b5e1768463 |
macos-arm64 |
required |
SHA256: 19448f0d4aaafa85c93c86e363ca879e5ccdcfdda42ba5ce4ac3817e9d8eecdb |
win32 |
required |
SHA256: 167e9299fa1d022b493c76332f507f6a6735c7bfec3cf91c54a598b331c78b5f |
win64 |
required |
SHA256: 167e9299fa1d022b493c76332f507f6a6735c7bfec3cf91c54a598b331c78b5f |
ninja
Ninja build system
On Linux and macOS, it is recommended to install ninja using the OS package manager. However, for convenience it is possible to install ninja using idf_tools.py along with the other tools.
License: Apache-2.0
More info: https://github.com/ninja-build/ninja
Platform |
Required |
Download |
---|---|---|
linux-amd64 |
optional |
https://dl.espressif.com/dl/ninja-1.10.2-linux64.tar.gz SHA256: 32bb769de4d57aa7ee0e292cfcb7553e7cc8ea0961f7aa2b3aee60aa407c4033 |
macos |
optional |
https://dl.espressif.com/dl/ninja-1.10.2-osx.tar.gz SHA256: 847bb1ca4bc16d8dba6aeed3ecb5055498b86bc68c364c37583eb5738bb440f1 |
macos-arm64 |
optional |
https://dl.espressif.com/dl/ninja-1.10.2-osx.tar.gz SHA256: 847bb1ca4bc16d8dba6aeed3ecb5055498b86bc68c364c37583eb5738bb440f1 |
win64 |
required |
https://dl.espressif.com/dl/ninja-1.10.2-win64.zip SHA256: bbde850d247d2737c5764c927d1071cbb1f1957dcabda4a130fa8547c12c695f |
idf-exe
IDF wrapper tool for Windows
License: Apache-2.0
More info: https://github.com/espressif/idf_py_exe_tool
Platform |
Required |
Download |
---|---|---|
win32 |
required |
https://github.com/espressif/idf_py_exe_tool/releases/download/v1.0.3/idf-exe-v1.0.3.zip SHA256: 7c81ef534c562354a5402ab6b90a6eb1cc8473a9f4a7b7a7f93ebbd23b4a2755 |
win64 |
required |
https://github.com/espressif/idf_py_exe_tool/releases/download/v1.0.3/idf-exe-v1.0.3.zip SHA256: 7c81ef534c562354a5402ab6b90a6eb1cc8473a9f4a7b7a7f93ebbd23b4a2755 |
ccache
Ccache (compiler cache)
License: GPL-3.0-or-later
More info: https://github.com/ccache/ccache
Platform |
Required |
Download |
---|---|---|
win64 |
required |
https://github.com/ccache/ccache/releases/download/v4.3/ccache-4.3-windows-64.zip SHA256: a9cacae73c3906d8193456328bee74f7748cb1559a32eaced9ee78eadd416105 |
dfu-util
dfu-util (Device Firmware Upgrade Utilities)
License: GPL-2.0-only
More info: http://dfu-util.sourceforge.net/
Platform |
Required |
Download |
---|---|---|
win64 |
required |
https://dl.espressif.com/dl/dfu-util-0.9-win64.zip SHA256: 5816d7ec68ef3ac07b5ac9fb9837c57d2efe45b6a80a2f2bbe6b40b1c15c470e |