A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/tools/idf-tools.html below:

Website Navigation


Downloadable IDF Tools - ESP32

Downloadable IDF Tools

[中文]

The 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 (e.g., apt, yum, brew, etc.) is the preferred method, when the required version of the tool is available. This recommendation is reflected in the Get Started. For example, on Linux and macOS, it is recommended to install CMake using an OS package manager.

However, some of the tools are specific to ESP-IDF and are not available in OS package repositories. Furthermore, different ESP-IDF versions require different tool versions for proper operation. To solve these two problems, ESP-IDF provides a set of scripts that can download and install the correct tool versions and set up the environment accordingly.

The rest of the document refers to these downloadable tools simply as "tools". Other kinds of tools used in ESP-IDF are:

The following sections explain the installation method and provide the list of tools installed on each platform.

Note

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 Get Started.

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 the tools/idf_tools.py script when installing the tools or setting up the environment variables.

Tools Installation Directory

The IDF_TOOLS_PATH environment variable specifies the location where the tools are to be downloaded and installed. If not set, the default location will be HOME/.espressif on Linux and macOS, and %USER_PROFILE%\.espressif on Windows.

Inside the IDF_TOOLS_PATH directory, the tools installation scripts create the following directories and files:

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, a GitHub assets mirror can be configured.

To use Espressif's download server, set the environment variable IDF_GITHUB_ASSETS to dl.espressif.com/github_assets, or dl.espressif.cn/github_assets for faster download in China. 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. For any GitHub asset URL that the install process downloads, it will replace https://github.com with https://${IDF_GITHUB_ASSETS}.

Note

The Espressif download server currently does not mirror everything from GitHub, but only files attached as Assets to some releases, as well as source archives for some releases.

idf_tools.py Script

The tools/idf_tools.py script bundled with ESP-IDF performs several functions:

Install Scripts

Shell-specific user-facing installation scripts are provided in the root directory of ESP-IDF repository to facilitate tools installation. These are:

Apart from downloading and installing the tools in IDF_TOOLS_PATH, these scripts prepare a Python virtual environment, and install the required packages into that environment.

These scripts accept optionally a comma-separated list of chip targets and --enable-* arguments for enabling features. These arguments are passed to the idf_tools.py script which stores them in idf-env.json. Therefore, chip targets and features can be enabled incrementally.

To install tools for all chip targets, run the scripts without any optional arguments using idf_tools.py install --targets=all. Similarly, to install Python packages for core ESP-IDF functionality, run idf_tools.py install-python-env --features=core.

It is also possible to install tools for specific chip targets. For example, install.sh esp32 installs tools only for ESP32. See Step 3. Set up the Tools for more examples.

install.sh --enable-XY enables feature XY (by running idf_tools.py install-python-env --features=core,XY).

Export Scripts

Since the installed tools are not permanently added to 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:

Note

To modify the shell environment in Bash, export.sh must be "sourced" by using the command . ./export.sh. Please ensure to include the leading dot and space.

export.sh may be used with various shells like Bash, Zsh, sh, dash, etc. When using Bash or Zsh, you can run it from any path (e.g., . ./<<some_path>>/export.sh) as it automatically detects IDF_PATH. For other shells, it must be run from the ESP-IDF directory (. ./export.sh) to locate IDF_PATH correctly.

activate.py

The environment setup is handled by the underlying tools/activate.py Python script. This script performs all necessary preparations and checks, generating a temporary file that is subsequently sourced by the export script.

activate.py can also function as a standalone command. When run, it launches a new child shell with an ESP-IDF environment, which can be utilized and then exited with the exit command. Upon exiting the child shell, you will return to the parent shell from which the script was initially executed.

Additionally, the specific behavior of the activate.py script can be modified with various options, such as spawning a specific shell with ESP-IDF using the --shell option. For more information on available options, use the activate.py --help command.

Note

When using activate.py on Windows, it should be executed with python activate.py. This ensures the script runs in the current terminal window rather than launching a new one that closes immediately.

Other Installation Methods

Depending on the environment, more user-friendly wrappers for idf_tools.py are provided:

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.

When performing a custom installation, ensure that the ESP_IDF_VERSION environment variable is set to reflect the current ESP-IDF version, using a format like 5.3 to represent ESP-IDF version v5.3. This variable is required by some components for version-specific configurations and is typically set by the idf_tools.py export script in standard installations.

Uninstall ESP-IDF

Uninstalling ESP-IDF requires removing both the tools and the environment variables that have been configured during the installation.

Note

Uninstalling the ESP-IDF tools does not remove any project files or your code. Be mindful of what you are deleting to avoid losing any work. If you are unsure about a step, refer back to the installation instructions.

These instructions assume that the tools were installed following the procedures in this provided document. If you've used a custom installation method, you might need to adapt these instructions accordingly.

List of ESP-IDF Tools xtensa-esp-elf-gdb

GDB for Xtensa

License: GPL-3.0-or-later

More info: https://github.com/espressif/binutils-gdb

riscv32-esp-elf-gdb

GDB for RISC-V

License: GPL-3.0-or-later

More info: https://github.com/espressif/binutils-gdb

xtensa-esp-elf

Toolchain for 32-bit Xtensa based on GCC

License: GPL-3.0-with-GCC-exception

More info: https://github.com/espressif/crosstool-NG

esp-clang

Toolchain for all Espressif chips based on clang

License: Apache-2.0

More info: https://github.com/espressif/llvm-project

esp-clang-libs

Standalone Clang shared libraries distribution

License: Apache-2.0

More info: https://github.com/espressif/llvm-project

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

esp32ulp-elf

Toolchain for ESP32 ULP coprocessor

License: GPL-3.0-or-later

More info: https://github.com/espressif/binutils-gdb

cmake

CMake build system

On Linux and macOS, it is recommended to install CMake using the OS-specific package manager (like apt, yum, brew, etc.). 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

openocd-esp32

OpenOCD for ESP32

License: GPL-2.0-only

More info: https://github.com/espressif/openocd-esp32

ninja

Ninja build system

On Linux and macOS, it is recommended to install ninja using the OS-specific package manager (like apt, yum, brew, etc.). 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

idf-exe

IDF wrapper tool for Windows

License: Apache-2.0

More info: https://github.com/espressif/idf_py_exe_tool

ccache

Ccache (compiler cache)

License: GPL-3.0-or-later

More info: https://github.com/ccache/ccache

dfu-util

dfu-util (Device Firmware Upgrade Utilities)

License: GPL-2.0-only

More info: http://dfu-util.sourceforge.net/

esp-rom-elfs

ESP ROM ELFs

License: Apache-2.0

More info: https://github.com/espressif/esp-rom-elfs

qemu-xtensa

QEMU for Xtensa

Some ESP-specific instructions for running QEMU for Xtensa chips are here: https://github.com/espressif/esp-toolchain-docs/blob/main/qemu/esp32/README.md

License: GPL-2.0-only

More info: https://github.com/espressif/qemu

qemu-riscv32

QEMU for RISC-V

Some ESP-specific instructions for running QEMU for RISC-V chips are here: https://github.com/espressif/esp-toolchain-docs/blob/main/qemu/esp32c3/README.md

License: GPL-2.0-only

More info: https://github.com/espressif/qemu


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4