Espressif IDF Component Manager
The IDF Component Manager is a Python-based tool by Espressif that integrates with the ESP-IDF build system to download and manage components from the ESP Component Registry or Git repositories. It ensures that correct versions of all project dependencies are present during a CMake run. This library, currently at version 3.0.1, receives updates frequently, often tied to major ESP-IDF releases, with major version bumps indicating significant breaking changes.
Warnings
- breaking Version 3.0.0 dropped support for Python versions older than 3.10. Projects using `idf-component-manager` 3.x.x must use Python 3.10 or newer.
- breaking Version 3.0.0 introduced breaking changes in ESP-IDF integration, requiring ESP-IDF version 6.0.0 or later. Older ESP-IDF versions are no longer supported by `idf-component-manager` v3.x.x.
- deprecated Environment variables `IDF_COMPONENT_KNOWN_TARGETS` and `IDF_COMPONENT_MANAGER_KNOWN_TARGETS` were removed in version 3.0.0.
- gotcha The component manager is not fully supported in 'IDF as a Lib' projects (projects that use `IDF`'s `tools/cmake/idf_as_lib.cmake`). As of March 2024, it's primarily designed for projects using `IDF`'s `tools/cmake/project.cmake`.
- gotcha If you manually add or modify an `idf_component.yml` manifest file, you need to run `idf.py reconfigure` to ensure CMake picks up the changes and the component manager processes the new dependencies.
Install
-
pip install idf-component-manager
Imports
- idf_component_manager
python -m idf_component_manager <command>
- compote
compote <command>
Quickstart
# Navigate to your ESP-IDF project directory # Add a dependency to your main component (e.g., 'example/cmp') idf.py add-dependency example/cmp # Or create a manifest file and then build # idf.py create-manifest # Edit main/idf_component.yml to add dependencies like: # dependencies: # espressif/json: '^1.0.0' # Then, reconfigure and build your project: # idf.py reconfigure # idf.py build