Commit Graph

7512 Commits

Author SHA1 Message Date
Ivan Grokhotkov (bot) 20b9e06e92 ci: add API compatibility check job for merge requests
Add a check_api_compatibility CI job that uses esp-api-check to detect
breaking API changes in merge requests. The job compares API
declarations between the MR base and head commits using libclang, and
posts a discussion thread on the MR if WARNING or BREAKING changes are
found.

- Add CI job in host-test.yml with clang toolchain and allow_failure
- Add test_api_check project for CMake configuration with all
  components enabled
- Define __DOXYGEN__ and IDF_DOC_BUILD so the checker can see
  declarations behind these guards

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:12:40 +01:00
Peter Dragun 1ea8dbab0d fix(idf_tools.py): Print correct path to Install Certificates.command on macOS
Related to: https://github.com/espressif/esp-idf/issues/17787
2026-03-06 15:58:04 +01:00
Sudeep Mohanty 7f7f40404b Merge branch 'feat/buildv2_component_cb_framework' into 'master'
feat(cmakev2): Add build event callback framework for components

See merge request espressif/esp-idf!46018
2026-03-04 15:12:53 +01:00
Sudeep Mohanty 45dc2e5868 fix(cmakev2): Defer idf_component_optional_requires linking to library build time
This commit introduces a new build property, __OPTIONAL_REQUIRES_MODE,
and uses it to either defer or link immediately, optional requirements
to components that request such linkage via the
idf_component_optional_requires() function in build system v2. The
DEFERRED mode is intended for single-binary projects where in the linking
of optional components happens after the library target is created the
dependency graph is available to the build system, thereby allowing it to
behave like the v1 version of the function.

Made-with: Cursor
2026-03-04 15:09:15 +01:00
igor.masar c30851292f docs(usb): Update links and example checks
Replace the peripherals index USB entries with direct links to
ESP-USB so the generated pages are no longer redirect-only stubs.

Keep legacy USB URLs working via redirects, including the
individual USB host maintainer notes pages.

Remove the obsolete placeholder documents and stale CODEOWNERS
pattern.

Mark the moved USB examples as KNOWN_MISSING in the example
documentation checker until it can also read the ESP-USB guide.
2026-03-03 17:01:08 +01:00
Sudeep Mohanty 881fa55266 Merge branch 'feat/buildv2_enable_cmake_tests' into 'master'
test(buildv2): Enable all buildv2 tests in CI

Closes IDF-15080

See merge request espressif/esp-idf!46088
2026-03-02 11:28:25 +01:00
Alexey Lapshin 867f0303a5 Merge branch 'feature/gdbstub_support_watchpoint_reason' into 'master'
feat(esp_gdbstub): support watchpoint trigger reason

Closes IDF-7306

See merge request espressif/esp-idf!45938
2026-03-02 12:26:32 +04:00
Marius Vikhammer 82665cbbbe ci(docs): add check that all IDF examples are referenced in the programming guide
Made-with: Cursor
2026-02-28 10:41:50 +08:00
David Čermák 21c2ada4f2 Merge branch 'feat/wifi_remote_migration' into 'master'
feat(wifi_remote): Add wifi remote to IDF

Closes IDF-15268

See merge request espressif/esp-idf!45775
2026-02-27 20:46:01 +08:00
Sudeep Mohanty 152ff182cc test(buildv2): enable test_cmake.py for cmakev2
Add buildv2 path and option handling for idf_as_lib, import_lib, and
related tests. Use cmakev2 examples when running with buildv2.
2026-02-27 12:56:38 +01:00
Sudeep Mohanty 873428d3a2 test(buildv2): skip test_post_elf_dependency for cmakev2
Post-ELF dependency API is not used in cmakev2; component callback method
replaces this. Skip the test when running buildv2.
2026-02-27 12:56:04 +01:00
Sudeep Mohanty 8fbf899d83 test(buildv2): skip test_spaces bundles not yet ported to buildv2 2026-02-27 12:54:16 +01:00
Sudeep Mohanty ea4489d7c9 refactor(test_spaces): ruff formatting to test_spaces.py 2026-02-27 12:53:04 +01:00
David Cermak 4a3b631143 fix(ci): Temporarily add esp_wifi_he.h to public header exceptions
Since it causes issues when including directly by the checker
* causes conflicts with remote and local versions of esp_wifi_he_types.h
* this issue will be solved by replacing #pragma once with old style
  sentinels, thus including either remote or local version
2026-02-27 09:15:29 +01:00
David Cermak 78017aa02c feat(ci): Add wifi-remote generation check to CI 2026-02-27 09:14:57 +01:00
David Cermak 7d5e141e37 fix(tools): Update err-to-name to support exception list 2026-02-27 09:14:57 +01:00
morris ca17b599c4 feat(crc): added async crc console example 2026-02-27 10:56:25 +08:00
Jiang Jiang Jian 5d2668b771 Merge branch 'feat/update_wifi_iperf_example' into 'master'
Feat: update iperf examples

See merge request espressif/esp-idf!44705
2026-02-26 17:49:51 +08:00
Fu Hanxi c3cd385ad3 Merge branch 'ci/freeze-known-failure-cases' into 'master'
ci: freeze known failure cases file

See merge request espressif/esp-idf!45894
2026-02-26 10:35:01 +01:00
Chen Yudong 9afec3c4f3 fix: use iperf-cmd for example esp_ble_mesh/wifi_coexist 2026-02-26 12:01:56 +08:00
morris 5972e377ef test(ppa): add support for esp32p4 eco4 in PPA tests 2026-02-26 11:50:57 +08:00
Chen Yudong 4e032bf3e1 feat(example): update iperf examples 2026-02-26 11:23:45 +08:00
igor.udot c3c9403567 ci: freeze known failure cases file 2026-02-26 10:56:24 +08:00
Sudeep Mohanty a8423cf751 Merge branch 'feat/buildv2_examples' into 'master'
feat(cmakev2): Added cmakev2 examples

Closes IDF-13070, IDF-14185, and IDF-15153

See merge request espressif/esp-idf!45400
2026-02-25 13:58:27 +01:00
igor.udot 1a43a47dfd ci: ignore python warnings 2026-02-25 18:02:01 +08:00
Frantisek Hrbata bb1d3802a2 Merge branch 'fix/cmakev2_embed_files' into 'master'
fix(cmakev2): fix embedded file source generation

See merge request espressif/esp-idf!45738
2026-02-25 03:44:30 +01:00
Sudeep Mohanty 19040b761b test(cmakev2): add POST_ELF build event callback test 2026-02-24 15:17:08 +01:00
Sudeep Mohanty 678b4955fd feat(cmakev2): Add build event callback framework for components
Introduce a callback mechanism that lets components register CMake
functions to be called at specific points in the build lifecycle.

Currently, this framework only supports registering callbacks to be
called after the executable target is created, i.e, the POST_ELF phase
of the build but before the binary target is created.
2026-02-24 15:17:08 +01:00
Roland Dobai e25c0e697c Merge branch 'fix/ai_idf_ver_fallback_when_no_git' into 'master'
fix(cmake): Fall back to version from components when git describe fails

Closes IDFGH-17245

See merge request espressif/esp-idf!45918
2026-02-24 12:34:13 +01:00
Sudeep Mohanty 454b944b76 feat(cmakev2): add idf_build_get_compile_options and use in compat and component
Add idf_build_get_compile_options() to aggregate COMPILE_OPTIONS,
C_COMPILE_OPTIONS, CXX_COMPILE_OPTIONS, and ASM_COMPILE_OPTIONS build
properties with generator expressions. Replace internal
__get_compile_options(OUTPUT ...) usage in idf_component_register and
idf_component_include with the new public function.
2026-02-24 11:21:19 +01:00
Sudeep Mohanty 6a878eb0bf fix(cmakev2): add --cref with MAPFILE_TARGET and remove global -Wl,--cref
When MAPFILE_TARGET is used in idf_build_executable, add the linker
--cref option so the cross-reference table is written to the map file
instead of stdout. Remove the global -Wl,--cref from default link
options in project.cmake so cref is only applied where a map file
is requested.
2026-02-24 11:21:19 +01:00
Roland Dobai 7a6405e824 Merge branch 'fix/cmakev2_ai_preserve_sdkconfig_managed_component_options' into 'master'
fix(cmakev2/kconfig): preserve sdkconfig options from managed components

Closes IDF-15347

See merge request espressif/esp-idf!45944
2026-02-24 10:46:22 +01:00
morris 8a0a3b921d Merge branch 'refactor/split_idf_hints' into 'master'
refactor(hints): move driver migration hints to own components

See merge request espressif/esp-idf!45895
2026-02-24 10:25:03 +08:00
Roland Dobai 5410fc0d5c Merge branch 'feat/esp_idf_sbom' into 'master'
feat(tools): esp-idf-sbom integration into idf.py

Closes IDF-15120

See merge request espressif/esp-idf!45696
2026-02-20 10:18:47 +01:00
Frantisek Hrbata a4c014f96e fix(cmake): Fall back to version from components when git describe fails
When version.txt does not exist and git describe fails (e.g. in
release archives or environments without git), IDF_VER was set to
the raw git_describe output which resolves to "-128-NOTFOUND",
causing esp_get_idf_version() to return a garbled string.

Add a fallback that constructs the version string from the
IDF_VERSION_MAJOR, IDF_VERSION_MINOR and IDF_VERSION_PATCH
variables when git describe is not available.

Closes https://github.com/espressif/esp-idf/issues/18240

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-02-20 15:50:55 +08:00
Sudeep Mohanty d7fd22b18f Merge branch 'test/cmakev2_enable_loadable_elf_test' into 'master'
Require micro-ecc only for BOOTLOADER_BUILD and enable test_build_loadable_elf test for cmakev2

See merge request espressif/esp-idf!45946
2026-02-19 15:24:23 +01:00
Sudeep Mohanty c856426c30 test(cmakev2): Enable test_build_loadable_elf for buildv2
Remove the buildv2_skip marker from test_build_loadable_elf.
2026-02-18 11:07:46 +01:00
Frantisek Hrbata 7bc635bd9e fix(test_build_system): add __init__.py to buildv2 test directory
Pytest's default import mode (prepend/rootdir) imports test modules as
top-level modules keyed by filename. When two directories contain test
files with the same basename (e.g. test_sdkconfig.py in both
test_build_system/ and test_build_system/buildv2/), pytest tries to
register both as the module name "test_sdkconfig". The second collection
fails with "import file mismatch" because the module object already
cached in sys.modules points to the first file.

Adding __init__.py to the buildv2/ directory makes it a proper Python
package. Pytest then imports its test modules under the package
namespace (buildv2.test_sdkconfig), which is distinct from the
top-level test_sdkconfig, resolving the collision.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-02-18 17:29:18 +08:00
Frantisek Hrbata 0f349ee404 fix(cmakev2/kconfig): preserve sdkconfig options from managed components
The sdkconfig file may contain configuration options defined in Kconfig
files of managed components. Since kconfgen runs before the component
manager fetches these components, the Kconfig definitions for managed
component options are not yet available. The kconfgen --output config
flag regenerates sdkconfig from kconfiglib's internal state, which only
knows about options with loaded Kconfig definitions. This causes unknown
options (i.e., those from managed components) to be silently dropped
from sdkconfig during intermediate regeneration rounds.

Note that kconfgen's --config flag (used for reading sdkconfig) only
performs deprecated option name replacement and does NOT drop unknown
options. The problem is exclusively in --output config, which writes a
fresh sdkconfig from the parsed Kconfig tree state.

Fix this by introducing a __SDKCONFIG_ORIG build property that provides
an indirection layer for the --config input path:

- Before the component manager runs: __SDKCONFIG_ORIG points to a copy
  of the original sdkconfig (build/sdkconfig.orig), created by the new
  __create_sdkconfig_orig_copy() function. This copy preserves all
  original options, including those from managed components.

- During intermediate kconfgen runs: --config reads from the preserved
  copy (so unknown options survive as input), while --output config
  writes to the real sdkconfig (unknown options may be dropped there,
  but this is harmless since kconfgen always reads from the copy).

- After the component manager completes: __SDKCONFIG_ORIG is reset to
  point to the real sdkconfig and __BASE_KCONFGEN_CMD is rebuilt, so
  that subsequent operations (menuconfig, save-defconfig, confserver)
  read and write the actual sdkconfig file directly.

The flow is:

  __create_sdkconfig_orig_copy()
    -> __SDKCONFIG_ORIG = build/sdkconfig.orig

  __generate_sdkconfig()
    -> --config build/sdkconfig.orig --output config project/sdkconfig

  __fetch_components_from_registry():
    loop:
      download_components()
      __generate_sdkconfig()
        -> --config build/sdkconfig.orig --output config project/sdkconfig
      if success: break
    endloop
    -> __SDKCONFIG_ORIG = project/sdkconfig
    -> rebuild __BASE_KCONFGEN_CMD

  idf_create_menuconfig() / save-defconfig / confserver
    -> uses --config project/sdkconfig (the real file)

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-02-18 17:29:18 +08:00
Jan Beran 86020e9732 feat(cmakev2): add config-report target 2026-02-18 16:23:37 +08:00
Alexey Lapshin cba0956463 feat(esp_gdbstub): support watchpoint trigger reason 2026-02-18 12:17:12 +07:00
Sudeep Mohanty f3456ea214 fix(cmakev2): Fixed test_hint_components_loading for buildv2
The test_hint_components_loading fails for buildv2 because the build
system only links the main component but not the components with the
hints.yml. Updated the test to explicitly include the new components in
the build.
2026-02-17 16:51:07 +01:00
Sudeep Mohanty 13830bcaff fix(cmakev2): Skip test_minimal_build_without_main_component for cmakev2
Build System v2 does not support the MINIMAL_BUILD property hence the
test test_minimal_build_without_main_component is not applicable for
cmakev2.
2026-02-16 17:42:37 +01:00
Frantisek Hrbata b90098a9f2 feat(tools): esp-idf-sbom integration into idf.py
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>
2026-02-16 09:03:17 +01:00
morris ab16c09947 refactor(hints): move driver migration hints to own components 2026-02-14 15:51:18 +08:00
Alexey Lapshin ca5b578b1c Merge branch 'feature/test-next-command-for-gdbstub-runtime' into 'master'
fix(tests): gdbstub: test 'next' command for every target

Closes IDF-7927 and IDF-7268

See merge request espressif/esp-idf!45799
2026-02-13 19:14:33 +04:00
Alexey Lapshin 8aee87c642 Merge branch 'fix/gdbstub-riscv-hungs-on-fpu-first-touch' into 'master'
fix(gdbstub): fix task lookup by frame

Closes IDF-15053

See merge request espressif/esp-idf!45815
2026-02-13 19:12:03 +04: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 c311fb0db3 test(tools): Added test for coponent hints loading 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