Commit Graph

494 Commits

Author SHA1 Message Date
Ivan Grokhotkov (bot)
b3a0e166fe feat: add compile_options support to idf.py build-file
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>
2026-07-21 22:04:41 +02:00
Ivan Grokhotkov
16275df0a1 feat: add idf.py build-file command for standalone C files
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>
2026-07-21 22:04:41 +02:00
Marek Fiala
8974c24968 feat(tools): idf.py --port autocompletion 2026-07-15 20:19:07 +08:00
Marek Fiala
8c08c75f48 feat(tools): adopt esp-pylib for idf.py logging and errors
Migrate idf.py and its actions to the shared esp-pylib library:
- add esp-pylib (and esp-pylib[ide]) to the core/ide requirements
- base FatalError on esp_pylib.errors.FatalError, keeping the idf.py ctx cleanup
- replace the local raw-ANSI helpers (red_print/yellow_print/print_warning/
  color_print) with esp_pylib.logger.log (warn/err/note/hint) across the
  idf.py actions
- install esp_pylib exception reporting at the idf.py entry point and silence
  the logger during shell completion
- update affected tests for the new prefixes/line wrapping
- add normalize_output() helper and unify terminal env in conftest to handle
  Rich line-wrapping in CI assertions

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 20:19:07 +08:00
Roland Dobai
d022d594fe Merge branch 'fix/cmake-colors' into 'master'
fix: force colors in output of RunTool and ensure_build_directory

See merge request espressif/esp-idf!49966
2026-06-24 19:18:30 +02:00
Jan Beran
f963565341 fix: force colors in output of RunTool and ensure_build_directory 2026-06-24 12:47:16 +02:00
Marek Fiala
12ea480988 feat(tools): Improved verification of ESP-IDF project
Closes https://github.com/espressif/esp-idf/issues/18675
2026-06-24 18:46:39 +08:00
Marek Fiala
1be844551a feat(tools): mcp-server added create-project tool 2026-06-24 18:46:39 +08:00
Marek Fiala
2dd6b604fa feat(tools): mcp-server accepts project_dir from chat
At the same time, it's possible to start idf.py mcp-server
outside ESP-IDF project directory.

Added ESP-IDF mcp server tests
2026-06-24 18:46:39 +08:00
Jan Beran
dd742179ee fix: cleanup after dropping curses from menuconfig
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 16:56:46 +02:00
Roland Dobai
941bc94ec6 Merge branch 'feat/generate_per_component_headers' into 'master'
feat(kconfig): add support for per option based build optimization

Closes IDF-8957

See merge request espressif/esp-idf!41966
2026-06-02 19:46:09 +02:00
Jan Beran
9522af1d8f feat: introduce esp-idf-configdep as a build optimization
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
2026-06-02 01:26:10 +08:00
Marek Fiala
f8799b8bba feat(tools): idf.py --help custom CMake targets rich-click style 2026-06-01 20:07:27 +08:00
Marek Fiala
eb91e45092 feat(tools): Replaced click with rich_click 2026-06-01 20:07:27 +08:00
Tomas Rezucha
232035071e feat(tools): Add 'check' field to idf.py actions 2026-05-27 19:06:10 +02:00
igor.masar
d4d993c818 feat(soc): add USB DFU and OTG console caps
Add USB DFU and OTG console SOC capability flags for esp32s2, esp32s3, and esp32p4.

Use these caps in Kconfig, documentation conditionals, and idf.py DFU actions so USB support
is derived from SOC capabilities instead of hardcoded target names.
2026-05-27 10:58:50 +02:00
Marius Vikhammer
027a1509be fix(tools): dont call idf_size.py for linux target
Calling idf.py size on linux target project would cause an
error. This was a problem for IDEs or build script which
often call this as the last step in the build process,
as it could mark the whole "build" as failed.
2026-05-27 08:53:01 +08:00
Alexey Gerenkov
edb75262a1 Merge branch 'feature/update-esp-clang-to-esp-21.1.3_20260304' into 'master'
feat(tools): update esp-clang version to esp-21.1.3_20260408

Closes IDF-14965, LLVM-501, and LLVM-531

See merge request espressif/esp-idf!46361
2026-05-13 22:54:10 +08:00
Jakub Kocka
6e4ed2c204 fix(tools): Forward build subprocess stdout as UTF-8 bytes on Windows 2026-05-12 18:14:27 +08:00
Alexey Gerenkov
f16bb34ff7 fix(build): fix Clang 21 build warnings/errors 2026-05-07 17:42:38 +03:00
Ashish Sharma
cd38d68bd1 feat(bootloader_support): remove P192 curve support 2026-04-30 18:04:00 +08:00
Jakub Kocka
d715ed0244 Merge branch 'feat/create-project_c++' into 'master'
feat(tools): Added create-project argument to allow cpp project creation

Closes IDFGH-15480

See merge request espressif/esp-idf!47373
2026-04-28 17:37:03 +08:00
Jakub Kocka
c21d05e612 feat(tools): Added listing of CMake custom targets in idf.py --help 2026-04-28 09:46:35 +02:00
Jakub Kocka
fb02854ad6 feat(tools): Added create-project argument to allow cpp project creation
Closes https://github.com/espressif/esp-idf/issues/16121
2026-04-28 09:24:20 +02:00
Fu Hanxi
2aee18d827 feat(build): support env var IDF_PY_BUILD_JOBS for ninja jobs 2026-04-16 13:27:18 +02:00
Marek Fiala
4d1612cd3c feat(tools): Restrict loading extension components to trusted sources 2026-04-15 16:30:57 +08:00
Radim Karniš
38d37e5e9f feat(idf_py): idf.py flash will reflash only changed data sectors by default
idf.py flash -a is introduced to trigger a flash of all data (not just changed sectors).
2026-04-02 10:59:30 +02:00
Marek Fiala
c07737ee17 feat(tools): mcp_ext.py commands adjustments 2026-03-16 13:27:54 +08:00
morris
ab16c09947 refactor(hints): move driver migration hints to own components 2026-02-14 15:51:18 +08:00
Marek Fiala
eb0086ef7f change: Moved esp-tls hint to component specific hints.yml file 2026-02-13 15:59:31 +08:00
Marek Fiala
75bf3bdb54 feat(tools): Extended hints.yml loading from components 2026-02-13 15:59:31 +08:00
Chen Chen
60284a9c86 feat(sdm): remove sdm_channel_set_duty API 2026-01-13 16:26:57 +08:00
Song Ruo Jing
643b2508fa refactor(uart): remove soc/uart_channel.h 2025-12-25 14:42:43 +08:00
yinqingzhao
a6b2eb6ad0 refactor(wifi): remove enum values WIFI_BW_HT20 and WIFI_BW_HT40 2025-12-24 14:11:52 +08:00
Marek Fiala
9d6c0ee7ce feat(tools): Clean up esp-idf-size new generation 2025-12-18 03:43:04 +08:00
morris
b385b6e533 Merge branch 'refactor/reduce_bin_size_when_dsi_without_dma2d' into 'master'
feat(lcd): support draw bitmap hook function

Closes IDFGH-15572

See merge request espressif/esp-idf!42209
2025-12-06 13:47:42 +08:00
Chen Jichang
1e190ccd74 feat(lcd): support draw bitmap hook function
Closes https://github.com/espressif/esp-idf/issues/16201
2025-12-05 15:44:38 +08:00
Peter Dragun
d64110442f Merge branch 'fix/output_rewrite' into 'master'
Fix dependencies for flash targets

Closes IDF-14540

See merge request espressif/esp-idf!43906
2025-12-04 17:39:00 +08:00
Peter Dragun
3f0fde84e1 fix(tools/idf.py): Add implicit dependencies to flash targets 2025-12-02 08:45:59 +01:00
Jan Beran
132f191874 feat(core-ext): Add refresh-config command
This command will allow users to resolve mismatches in default values
between sdkconfig and Kconfig according to a policy specified:

* sdkconfig: Using default values from sdkconfig (backward compatible)
* interactive: User can choose the source for every affected config
  option separatedly
* kconfig: Using default values from Kconfig
2025-11-25 20:31:08 +08:00
Jan Beran
bf9b9a0259 change(kconfig): add support for configuration report 2025-11-18 20:42:38 +08:00
C.S.M
a90c93541c feat(esp32s31): Introduce new target esp32s31 2025-11-17 14:48:55 +08:00
Song Ruo Jing
4b8633cc2b refactor(rom/gpio): add 'rom_' prefix to GPIO ROM functions 2025-11-07 15:26:52 +08:00
Marek Fiala
1e351a8b67 test(tools): Moved preset parsing into core_ext.py and added tests 2025-10-29 11:47:40 +08:00
Ivan Grokhotkov
78ae7ab085 feat(build): add idf.py support for CMake configuration presets
This commit adds a new idf.py --preset NAME argument, which allows
selecting the CMake configuration preset with a given name.
For idf.py, selecting the preset does two things:
- sets the build directory, which is specified in the preset itself
  using "binaryDir" field
- passes --preset argument to CMake configuration phase

The multi_config example is updated to illustrate how this feature is
expected to be used.
2025-10-29 11:47:40 +08:00
Jiang Jiang Jian
8e1ebcad18 Merge branch 'feat/support_nan_usd' into 'master'
Add support for Unsynchronized Service Discovery (USD)

See merge request espressif/esp-idf!30990
2025-10-22 14:00:49 +08:00
Marek Fiala
c4347a682d feat: Install mcp with initialization scripts 2025-10-20 16:22:54 +02:00
Mahavir Jain
7c517deb35 tools: add idf.py mcp-server support 2025-10-20 16:22:54 +02:00
Sarvesh Bodakhe
4c3d6c1292 fix(wifi): Add refactoring and migration guide for USD, Offchan_tx, ROC
1. fix(wifi): Rename old NAN configuration to NAN-Sync
  - Rename CONFIG_ESP_WIFI_NAN_ENABLE to CONFIG_ESP_WIFI_NAN_SYNC_ENABLE to indicate
    the support for Synchronized NAN (Wi-Fi Aware).
  - Because the original flag really controls the synchronized feature set, rename it
    to CONFIG_ESP_WIFI_NAN_SYNC_ENABLE so the NAN-Sync and NAN-USD paths can be
    selected independently without confusion.
2. Document esp_wifi_start requirement and fix USD examples
3. Rename nan_callbacks to nan_sync_callbacks
4. Remove the discovery_flag, clarify docs for sync vs USD flows, and add USD start/stop APIs
5. Require esp_wifi_start() before USD start
6. docs(nan): add NAN-USD application examples
7. add migration guide and hints for NAN-USD proto field
8. Improve allow_broadcast documentation
9. Add attention to the API esp_wifi_remain_on_channel
10. fix(wifi): align NAN API renames and docs for v6.0
  - keep shared APIs under esp_wifi_nan_* while reserving
    sync/usd names for mode-specific entry points
  - clarify synchronized-cluster scope in headers, docs, and migration notes (EN/zh-CN)
  - update examples for renamed helpers and WIFI_NAN_SYNC_CONFIG_DEFAULT()
  - rename `wifi_nan_config_t` to `wifi_nan_sync_config_t`
11. Mark NAN-USD as esp-idf experimental feature
2025-10-20 12:46:55 +05:30
morris
b76254895c refactor(mcpwm): remove varg action setting functions for timer, compare, and brake events 2025-10-09 16:38:39 +08:00