Commit Graph

51071 Commits

Author SHA1 Message Date
Frantisek Hrbata
a2461ea32b feat(cmakev2/kconfig): add GENERATE_SDKCONFIG build property
Add a GENERATE_SDKCONFIG build property that controls whether kconfgen
writes the sdkconfig file (--output config) during the configuration
step. It defaults to 1 (enabled).

When building the bootloader as a subproject, the set of components
(and their Kconfig files) differs from the main project. Running
kconfgen with --output config in this context rewrites the main
project's sdkconfig. Even when the content is identical, the timestamp
update causes ninja to detect sdkconfig as newer than build.ninja
outputs (e.g. cmake_install.cmake), triggering an infinite CMake
re-run loop.

Setting GENERATE_SDKCONFIG to 0 in a subproject prevents this,
matching the behaviour of cmakev1's __OUTPUT_SDKCONFIG property.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
c91597454d feat(cmakev2/idf): add PROJECT_COMPONENTS_SOURCE build property
Add the PROJECT_COMPONENTS_SOURCE build property to control how project
components are categorised during component discovery.  By default it is
set to "project_components" (priority 3 - highest), preserving the
existing behaviour.

Setting it to "idf_components" (priority 0) before calling
idf_project_init() makes the project's built-in components overridable
by user-supplied components through EXTRA_COMPONENT_DIRS (priority 2).

This is needed for sub-projects like the bootloader, whose built-in
components (e.g. main) are provided by ESP-IDF and should be overridable
by user-supplied components placed in bootloader_components/.  The
cmakev1 build system allowed this override because it used a
last-one-wins strategy, but cmakev2 uses strict priority-based component
resolution where project_components always win.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
3a0f0bb13f feat(cmakev2/build): add ALL option to idf_build_binary and idf_sign_binary
Add an optional ALL parameter to idf_build_binary and idf_sign_binary
functions. When specified, the created custom target is included in the
default build target. Without ALL, custom targets created by these
functions are excluded from the default build (add_custom_target
behavior), meaning they won't be built unless explicitly requested or
depended upon by another target in ALL.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
ba4c6de807 feat(cmakev2/utilities): add idf_target_post_build_msg helper
Add a helper function for printing multi-line post-build messages on a
target. The message lines are joined with newlines, written to a file at
configure time, and printed at build time using a single cmake -E cat
command, replacing the need for repeated cmake -E echo invocations.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
6b8aa157e5 feat(cmakev2/build): add idf_check_bootloader_size helper
Add a public API function to check that the bootloader binary does not
overlap the partition table, mirroring the existing idf_check_binary_size
pattern for application binaries.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
43d4fdd4b3 fix(cmakev2/build): fix typo in idf_sign_binary keyfile variable
The KEYFILE argument value was stored in a misspelled variable
"keyfle" instead of "keyfile", causing custom keyfile paths to
be silently ignored.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
413a0615bf fix(bootloader): remove CMAKE_CURRENT_LIST_DIR from bootloader_extra_component_dirs
`CMAKE_CURRENT_LIST_DIR` is actually `components/bootloader`, so it
doesn’t need to be passed via `EXTRA_COMPONENT_DIRS`: the build already
recognizes it as an esp-idf component.

In **cmakev1**, this is silently ignored: if a component with the same
name already exists, its directory is updated and the previous directory
is stored in the `COMPONENT_OVERRIDEN_DIR` component property.

In **cmakev2**, this is correctly detected and reported.

CMake Warning at /home/fhrbata/work/esp-idf/tools/cmakev2/utilities.cmake:63 (message):
   IDF: Component 'bootloader' directory '/home/fhrbata/work/esp-idf/components/bootloader'
   with higher priority 'project_extra_components' will be used instead of component directory
   '/home/fhrbata/work/esp-idf/components/bootloader' with lower priority 'idf_components'
Call Stack (most recent call first):
  /home/fhrbata/work/esp-idf/tools/cmakev2/component.cmake:625 (idf_warn)
  /home/fhrbata/work/esp-idf/tools/cmakev2/idf.cmake:411 (__init_component)
  /home/fhrbata/work/esp-idf/tools/cmakev2/project.cmake:580 (__init_components)
  CMakeLists_v2.txt:28 (idf_project_init)
  CMakeLists.txt:19 (include)

Since it doesn’t make sense to explicitly add the bootloader as an extra
component, remove it.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
44a610cbf0 feat(cmakev2/compat): allow to set commonly required components
The commonly required components are configured solely for backward
compatibility with cmakev1. Since the bootloader build explicitly sets
commonly required components, we need to support this feature in cmakev2
as well. Ideally, there should be no commonly required components, and
each component should specify its requirements explicitly.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
9204ed63e0 fix(bootloader_support/cmake): initialize priv_include_dirs variable
For the bootloader build, the `priv_include_dirs` variable is
uninitialized, but it is used in the common call to
`idf_component_register`.

Using uninitialized variables is not allowed in cmakev2 because a
component may be evaluated in the context of another component’s
variable scope.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
d4d778182f fix(esp_partition/cmake): remove unused PRIV_INCLUDE_DIRS
Currently, the bootloader version of the `esp_partition` component sets
`PRIV_INCLUDE_DIRS` using the `private_include_dirs` variable. However,
this variable is not properly initialized, which causes issues in
cmakev2. In cmakev2, components are evaluated recursively, and a
component may be evaluated in the context of another component, so
components must initialize all variables before using them.

Moreover, there are effectively no `PRIV_INCLUDE_DIRS` to set when the
component is evaluated for the bootloader. Therefore, remove
`PRIV_INCLUDE_DIRS` entirely for bootloader and test builds.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-27 19:18:11 +08:00
Frantisek Hrbata
3c8a4657a5 Merge branch 'fix/cmakev2_ci_fixes' into 'master'
fix(cmakev2): fix Linux target build and skip unsupported root component tests

See merge request espressif/esp-idf!47050
2026-03-27 12:12:42 +01:00
Fu Hanxi
87dd8ee147 Merge branch 'ci/eco-to-rev' into 'master'
ci: rename eco tags to revision

Closes CII-109

See merge request espressif/esp-idf!46061
2026-03-27 09:22:37 +01:00
Gao Xu
eddf3dbec1 Merge branch 'fix/isp_clk_error' into 'master'
Fix ISP clk source error and hal init error

See merge request espressif/esp-idf!46993
2026-03-27 15:01:40 +08:00
Jiang Jiang Jian
22d12355da Merge branch 'bugfix/bt_idf_ci' into 'master'
fix(bt/example): Fixed the HFP printing issue in the CI test

Closes IDFCI-9285

See merge request espressif/esp-idf!47057
2026-03-27 14:11:55 +08:00
Jiang Jiang Jian
a75b089f7f Merge branch 'bugfix/fix_set_protocol_bandwidth_wrong_before_wifi_start' into 'master'
fix(wifi): fix set protocol or bandwidth wrong before wifi start

Closes FCS-1857

See merge request espressif/esp-idf!46352
2026-03-27 14:07:55 +08:00
yangfeng
ba154fb3e1 fix(bt/example): Fixed the HFP printing issue in the CI test 2026-03-27 10:52:32 +08:00
Gao Xiao Jie
1473b02f50 Merge branch 'fix/remove_duplicate_ld_symbols_esp32s31' into 'master'
fix(rom): remove duplicate symbols in esp32s31.rom.rvfp.ld

See merge request espressif/esp-idf!47051
2026-03-27 10:46:10 +08:00
Wang Meng Yang
d9a53ecebe Merge branch 'bugfix/spp_improvement' into 'master'
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in SPP

See merge request espressif/esp-idf!46803
2026-03-27 10:41:51 +08:00
Wang Meng Yang
904ba3909e Merge branch 'bugfix/hid_improvement' into 'master'
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in HID

See merge request espressif/esp-idf!46771
2026-03-27 10:32:41 +08:00
gaoxiaojie
2ba8cc8dc8 fix(rom): remove duplicate symbols in esp32s31.rom.rvfp.ld 2026-03-27 09:01:56 +08:00
Frantisek Hrbata
76e7ea2ba5 fix(cmakev2): skip root component tests until cmakev2 support is added
The TestIdfRootDependency tests (test_basic_build,
test_build_only_when_required, test_cleanup_unused) were introduced in
MR 39704 to validate the idf_extra_components.yml root dependency
feature. This feature relies on component manager integration that is
not yet implemented in the cmakev2 build system, causing all three
tests to fail when run with --buildv2.

Skip these tests for cmakev2 using the buildv2_skip marker until root
components support is added (IDF-14259).

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-26 16:30:15 +01:00
Ondrej Kosta
bbd541c6a9 Merge branch 'fix/eth_init_component' into 'master'
fix(eth/examples): fixed ethernet_init dependency to v1.3.0

See merge request espressif/esp-idf!46921
2026-03-26 23:27:09 +08:00
Tomas Rohlinek
03086cb4a5 Merge branch 'feature/add_blockdev_docs' into 'master'
feat(storage/blockdev): Add documentation including contracts for operations

Closes IDF-12759

See merge request espressif/esp-idf!43156
2026-03-26 16:17:17 +01:00
Frantisek Hrbata
0505ced81d fix(vfs): initialize local variables in Linux target block to prevent scope leakage
In CMake v2's recursive component evaluation model, when a component
triggers the inclusion of another component via idf_component_include(),
the child component's directory scope inherits variables from the
caller's scope chain through the idf_component_include() function scope
and add_subdirectory().

The vfs component's Linux target block used list(APPEND ...) without
first initializing the srcs, inc, and priv_inc variables. This was
harmless when vfs was evaluated before esp_stdio, but after commit
5fac0b7386 ("feat(console): Move IO initialization outside of the
console component"), esp_stdio became a real component for the Linux
target and started calling idf_component_include(vfs). When esp_stdio
is evaluated first, its srcs variable (containing stdio_port.c and
linux/esp_stdio_linux.c) leaks into vfs's scope, causing the build
to fail with "Cannot find source file: components/vfs/stdio_port.c".

Fix by explicitly initializing all local variables at the top of the
Linux target block before appending to them.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-26 16:09:27 +01:00
Fu Hanxi
4f92cfd077 ci: rename eco tags to revision 2026-03-26 12:24:59 +01:00
Tomáš Rohlínek
d8e3106134 feat(storage/blockdev): Add documentation including contracts for operations 2026-03-26 12:20:35 +01:00
Song Ruo Jing
7b1d576416 Merge branch 'feature/esp32s31_regi2c_support' into 'master'
feat(regi2c): add support for ESP32S31

Closes IDF-14680

See merge request espressif/esp-idf!46469
2026-03-26 17:31:13 +08:00
yinqingzhao
7eac593c04 fix(wifi): fix set protocol or bandwidth wrong before wifi start 2026-03-26 17:04:09 +08:00
Alexey Gerenkov
42ea094194 Merge branch 'fix/clang_xtensa_ctors_call' into 'master'
fix(build): Fixed constructors placement by Clang for Xtensa

Closes IDFGH-16929

See merge request espressif/esp-idf!44064
2026-03-26 16:58:52 +08:00
Jiang Jiang Jian
e07b6dec77 Merge branch 'bugfix/fix_beacon_timeout_too_long_issue' into 'master'
fix(wifi): fix beacon timeout too long issue

Closes WIFI-7236

See merge request espressif/esp-idf!46055
2026-03-26 16:10:04 +08:00
Island
6d8c904249 Merge branch 'feat/support_adv_monitor_for_bluedroid_host' into 'master'
feat(ble/bluedroid): support adv monitor feature

Closes BLERP-2648

See merge request espressif/esp-idf!46775
2026-03-26 16:08:59 +08:00
Island
360e45adc3 Merge branch 'feat/allow_creat_vendor_descriptor_by_service_table' into 'master'
feat(ble/bluedroid): Allow add vendor descriptor by service table create API

Closes BLERP-2647

See merge request espressif/esp-idf!46843
2026-03-26 16:06:07 +08:00
Nachiket Kukade
44c77cbf46 Merge branch 'bugfix/coverity_get_band_failure' into 'master'
fix(wpa_supplicant): Fix coverity issue (CID 900721)

See merge request espressif/esp-idf!46340
2026-03-26 13:41:29 +08:00
Mahavir Jain
f6b7c2f9fe Merge branch 'fix/ds_ctx_efuse_key_id_type' into 'master'
Preserve flash compatibility by reverting the modified `esp_ds_data_ctx_t` size

See merge request espressif/esp-idf!47009
2026-03-26 10:12:02 +05:30
Nachiket Kukade
5cd80dd8a8 fix(wpa_supplicant): Fix coverity issue (CID 900721)
Return a valid band mode in case of get_band failure
2026-03-26 12:06:37 +08:00
muhaidong
592e6dc608 fix(wifi): fix beacon timeout too long issue 2026-03-26 11:51:56 +08:00
Wu Zheng Hui
1dbf5247d1 Merge branch 'feat/support_gpio_source_for_more_chips' into 'master'
feat(esp_hw_support): support GPIO wakeup deepsleep on esp32/esp32s2/esp32s3

Closes PM-666

See merge request espressif/esp-idf!45773
2026-03-26 11:28:45 +08:00
Jiang Jiang Jian
ae463064d7 Merge branch 'bugfix/leave_after_assoc_comeback_error' into 'master'
Leave connection after assoc comeback failure

Closes WIFIBUG-788

See merge request espressif/esp-idf!45464
2026-03-26 11:08:33 +08:00
Marius Vikhammer
1cab04c24f Merge branch 'fix/issue-18391-psram-default-docs' into 'master'
docs: clarify PSRAM default allocation behavior

See merge request espressif/esp-idf!46985
2026-03-26 10:18:22 +08:00
Harshal Patil
876b9581bd Merge branch 'fix/enable_key_mgr_clk_for_efuse_key_ops' into 'master'
Enable Key Manager clock even for efuses-based key operations

See merge request espressif/esp-idf!46740
2026-03-25 21:37:53 +05:30
harshal.patil
2b77826e06 fix(mbedtls/rsa_ds): Preserve compatibility by reverting the modified esp_ds_data_ctx_t size 2026-03-25 18:54:04 +05:30
C.S.M
48410f23f1 Merge branch 'feat/uhci_esp32h21' into 'master'
feat(uhci): Add support for uhci on esp32h21

Closes IDF-11619

See merge request espressif/esp-idf!46794
2026-03-25 20:02:40 +08:00
He Binglin
bb1fe0eaca Merge branch 'feat/esp_idf_esp32h21_eco1_sleep_support' into 'master'
Feat/esp idf esp32h21 eco1 sleep support

Closes PM-678 and IDF-15438

See merge request espressif/esp-idf!46484
2026-03-25 19:58:08 +08:00
Daniel Paul
914d32c101 Merge branch 'feat/move-cjson-to-root-dep' into 'master'
feat: support moving idf components to component registry

Closes PACMAN-1102

See merge request espressif/esp-idf!39704
2026-03-25 18:10:42 +08:00
gaoxu
2d929b8f64 fix(isp): fix isp multi pipelines example use wrong CSI output color type 2026-03-25 17:10:00 +08:00
gaoxu
cf3ed79040 fix(isp): fix isp registers can not be read/write error 2026-03-25 17:09:59 +08:00
gaoxu
87a1c02764 fix(isp): fix isp clock source error 2026-03-25 17:01:22 +08:00
Song Ruo Jing
7cbafcf1c6 feat(regi2c): add support for ESP32S31 2026-03-25 16:17:12 +08:00
hebinglin
bcb6fab9af change(esp_hw_support): add modem_lpcon retention for esp32h21 2026-03-25 15:40:07 +08:00
hebinglin
f9078e7538 feat(esp_hw_support): optimize esp32h21 eco1 active current 2026-03-25 15:40:05 +08:00