Allow specifying extra compiler flags (warning flags, preprocessor
definitions, etc.) via a new 'compile_options' entry in the
idf-build-file frontmatter. The options are applied to the source
file via target_compile_options in the generated main component
CMakeLists, with CMake quoting so that flags like -DMSG="hello world"
reach the compiler exactly as written.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a new idf.py extension that allows building standalone C files
without requiring full project boilerplate. Source files can include
optional YAML frontmatter in block comments to specify sdkconfig
options, component dependencies, and target configuration.
When the frontmatter configuration changes, the stale sdkconfig is
removed so the new defaults are applied, and a target change also
clears the build directory since IDF_TARGET is pinned in the CMake
cache.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Server can now start from any directory, not just a valid project dir
- Document project_dir argument available on all tools
- Add create-project tool to the list of available tools
Co-authored-by: Cursor <cursoragent@cursor.com>
The esp-idf-configdep utility works as a compiler wrapper. It lets the
compiler compile the app and checks whether -MF option was used to
generate dependency files. If yes, it checks for sdkconfig.h dependency
in those files.
Target file depending on sdkconfig.h is then scanned for all CONFIG_*
occurrences and the dependency file is altered so that the given target
file is marked as "dirty" only if the config options it actually uses
are changed.
This ensures that after a configuration update, only affected files are
rebuilt, reducing incremental build times.
The compiler launcher mechanism is changed from RULE_LAUNCH_COMPILE
(Makefile-only) to CMAKE_*_COMPILER_LAUNCHER (generator-agnostic),
enabling launcher chaining (configdep -> ccache -> compiler).
Made-with: Cursor
While the `esp-idf-sbom` `idf.py` extension is implemented within the
`esp-idf-sbom` python package, a few minor changes are also required on
the `idf.py` side.
1. Add `esp-idf-sbom` as a core requirement so it is automatically
installed by the installation scripts.
2. Add the `sbom-create` action to the list of actions for which the
flashing-related closing message is displayed.
3. Update the documentation in the api-guides for tools.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
The total flash size is no longer reported by esp-idf-size. Update the
output example in the documentation to reflect this change. Also,
include the note about total memory sizes as now printed by
esp-idf-size.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Add the initial documentation for the idf.py diagnostic tool, detailing
how it can be used to gather information for troubleshooting issues
related to the ESP-IDF project.
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>