Commit Graph

7744 Commits

Author SHA1 Message Date
Martin Vychodil
ddc9c5fc40 fix(test_build_system): require components in ioctl overlap checker tests
Wire esp_blockdev, comp_a, and comp_b into the test app dependency graph
so ioctl def files are registered and the POST_BUILD overlap checker runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-18 15:57:04 +02:00
Tomáš Rohlínek
a9f545bcea feat(esp_blockdev): add build-time ioctl command reservation overlap checker 2026-06-16 11:38:22 +02:00
Frantisek Hrbata
dd9e0a4da5 Merge branch 'feat/idf_component_include_optional' into 'master'
feat(cmakev2/component): add OPTIONAL flag to idf_component_include

See merge request espressif/esp-idf!48502
2026-06-11 08:02:58 +02:00
Jiang Jiang Jian
f6eceb316a Merge branch 'feat/support_esp32s31_dfu' into 'master'
Feat/support esp32s31 dfu

See merge request espressif/esp-idf!49329
2026-06-10 15:48:00 +08:00
Aditya Patwardhan
ebc4806085 Merge branch 'fix/disable_secure_boot_v2_ecdsa' into 'master'
Fix/disable secure boot v2 ecdsa

See merge request espressif/esp-idf!48834
2026-06-09 23:46:11 +05:30
Aditya Patwardhan
67e10e2b56 change(secure_boot): mark ECDSA based Secure Boot V2 as insecure on affected SoCs
ECDSA based Secure Boot V2 is not functional for certain input vectors on
ESP32-C5/C61/H2/P4 and on the preview targets ESP32-H4/H21. RSA based Secure
Boot V2 is the recommended scheme where the SoC supports it. This issue will be
fixed in a future hardware ECO revision; more details will be shared through the
hardware errata document.

A new hidden Kconfig option SECURE_BOOT_V2_ECDSA_INSECURE marks the affected
mass-production SoCs (ESP32-C5/C61/H2/P4). On these SoCs, when hardware Secure
Boot V2 is enabled, the ECDSA (V2) signing scheme is no longer offered by
default; it must be turned on explicitly via SECURE_BOOT_V2_FORCE_ENABLE_ECDSA
under "Allow potentially insecure options" (CONFIG_SECURE_BOOT_INSECURE). App
signing without hardware Secure Boot is not affected. Note that ESP32-C61 has no
RSA based Secure Boot V2, so it has no Secure Boot scheme enabled by default.

The preview targets ESP32-H4 and ESP32-H21 mark ECDSA Secure Boot V2 as not
supported in their SoC capabilities instead of using the option above. As
ESP32-H4 has no other Secure Boot V2 scheme, Secure Boot is disabled entirely on
it; ESP32-H21 retains RSA based Secure Boot V2.

The security documentation keeps the ECDSA Secure Boot V2 content visible and
adds a warning describing the limitation (including that ECDSA Secure Boot V2 on
ESP32-C61 is not recommended for production). CI apps that exercise ECDSA Secure
Boot V2 on the affected SoCs set CONFIG_SECURE_BOOT_V2_FORCE_ENABLE_ECDSA
accordingly.
2026-06-09 16:55:57 +05:30
Jiang Guang Ming
0c835d2141 fix(dfu): retry dfu-util flash on macOS detach failure
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 15:40:34 +08:00
Jiang Jiang Jian
853a2cfd3a Merge branch 'chip/support_wifi_low_power_for_s31_rebase_master' into 'master'
Chip/support wifi low power for s31 rebase master

Closes IDF-14579 and IDF-14582

See merge request espressif/esp-idf!48532
2026-06-09 15:16:53 +08:00
sibeibei
1ce999e59f feat(ci): enable build for esp32s31, disable CI test 2026-06-08 19:24:30 +08:00
Vojtech Piroch
0c4e73f590 feat(ldgen): migrate to esp-pylib 2026-06-08 10:18:00 +02:00
Ondrej Kosta
4431bce564 Merge branch 'feat/eth_test_component' into 'master'
feat(esp_eth): updated test_apps to use Ethernet test component

See merge request espressif/esp-idf!48977
2026-06-08 15:35:38 +08:00
Zhou Xiao
835c947761 Merge branch 'docs/ble-uart-tutorial' into 'master'
docs(ble): added ESP-BLE-UART OpenCode Companion Guide

See merge request espressif/esp-idf!48862
2026-06-05 20:17:23 +08:00
Zhou Xiao
926111e721 docs(ble): add ESP-BLE-UART companion guide
Move the OpenCode companion guide into the ble_uart_service example.

Add English and Chinese Markdown guides with image assets.

Keep ESP-BLE-UART naming consistent across the example and bridge tooling.
2026-06-05 19:01:00 +08:00
Guillaume Souchere
a010738ec2 Merge branch 'feat/new-freertos-linux-simulator' into 'master'
feat(freertos): Refactor linux simulator

Closes IDF-8339

See merge request espressif/esp-idf!43564
2026-06-05 12:18:44 +02:00
JiangGuangMing
dd9eb63e9d feat: support esp32s31 dfu feature 2026-06-05 15:59:04 +08:00
sonika.rathi
eda2d97bdb fix(spiffs): normalize spiffsgen CLI output with esp-pylib 2026-06-05 15:09:16 +08:00
Marius Vikhammer
1d311a7349 Merge branch 'feature/psram_freertos' into 'master'
feat(freertos): added option for automatically placing task stacks in PSRAM

Closes IDF-15538, IDF-15539, and IDF-15540

See merge request espressif/esp-idf!48953
2026-06-05 09:08:33 +08:00
Ondrej Kosta
fa05720f6c feat(ci): support downloading extra app artifacts in pytest
Add app_extra S3 artifact type, extend idf-ci download plumbing, and
expose a download_app_extra pytest fixture for managed_components deps.
2026-06-04 12:59:18 +02:00
Guillaume Souchere
9835daba70 feat(freertos/vfs): add Linux cooperative syscall dispatch with VFS FD registration
Rework the syscall interposition architecture so FreeRTOS works
standalone (without VFS) and VFS optionally overrides with strong
symbols.  All kernel FDs are registered with VFS via
esp_vfs_register_fd_with_local_fd, so the application only sees
VFS-allocated FD numbers, preventing numerical collisions between
kernel FDs and VFS-internal FD slots.

FreeRTOS side:
- Create linux_port_coop_internal.h with LINUX_COOP_IO_LOOP,
  LINUX_COOP_RESOLVE, linux_coop_yield and FD state table functions
- Export cooperative I/O primitives (freertos_linux_coop_read/write/
  open/close/fcntl/select/pread/pwrite/readv/writev/recv/send/
  recvfrom/sendto/recvmsg/sendmsg/connect/accept/pselect/poll/
  socket/socketpair/pipe/pipe2/dup/dup2/syscalls_init)
- Define weak POSIX symbols calling through to the cooperative
  primitives; keep nanosleep/sleep/usleep as strong (not FD-related)
- Refactor freertos_linux_coop_syscalls.h into a pure public API header

VFS side:
- Register the Linux host FS with esp_vfs_register_fs_with_id() as a
  proper VFS driver; register stdin/stdout/stderr at init (priority 99)
- Rewrite vfs_linux.c with strong POSIX symbols dispatching through
  esp_vfs_*
- Add strong overrides for FD-creating syscalls (open, pipe, pipe2,
  socket, socketpair, dup, dup2, accept) that register returned FDs
  with VFS
- Add strong overrides for FD-translating syscalls (readv, writev,
  recv, send, recvfrom, sendto, recvmsg, sendmsg, connect, pselect,
  poll) that translate VFS FD to kernel FD
- Delete vfs_coop_syscalls.c (absorbed into FreeRTOS weak + VFS strong)
- Update CMakeLists.txt: remove vfs_coop_syscalls.c, add linker hook
2026-06-04 11:36:34 +02:00
Guillaume Souchere
78420f2614 feat(freertos): soft-preempting linux simulator 2026-06-04 11:36:21 +02:00
Marius Vikhammer
d21dc8ca2e feat(freertos): added option for automatically placing task stacks in PSRAM
When CONFIG_FREERTOS_PLACE_TASK_STACKS_IN_EXT_RAM is enabled freertos will
now automatically allocate task stacks to PSRAM.
2026-06-04 16:06:52 +08:00
Jakub Kocka
2e5d930e6b fix(tools): Windows builds when paths contain spaces (prefix_map, ldgen, CI)
- Harden prefix_map.cmake for paths with spaces on Windows

- ldgen: fragments-list-file, list normalization, CMake integration (tools/cmake + cmakev2)

- CI exclude list for check_tools; test_spaces bundle tweak

Made-with: Cursor
2026-06-04 14:45:05 +08: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
9881fa8b12 ci(cmakev2): suppress CMake warning for unused CONFIGDEP_ENABLE variable
cmakev2 does not use configdep yet, so the manually specified variable
CONFIGDEP_ENABLE is unused. CMake warns about it, which causes CI to
fail. Until configdep is adopted by cmakev2, suppress the warning.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 01:26:10 +08:00
Jan Beran
3abb4c095b test: add esp-idf-configdep integration tests
Add build-level tests verifying configdep selective rebuild behavior:
- test_configdep.py: selective rebuild (only affected .obj rebuilt) and
  ELF string verification after Kconfig toggle
- test_rebuild_configdep.py: full rebuild graph tests with configdep enabled,
  including the two-build "settle" pattern for .cdep stub timestamps

Place the configdep test app in tools/test_build_system/configdep_test_app/
alongside the build system test infrastructure. Split configdep-specific
rebuild coverage from pure CMake/Ninja rebuild tests (test_rebuild.py runs
with configdep disabled via a module-local idf_py fixture).
2026-06-02 01:26:10 +08: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
4bc7d30fd4 feat(tools): Visibly grouped custom extension actions in idf.py --help 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
morris
302b820782 Merge branch 'chor/apply_astyle_to_hal_component' into 'master'
ci(astyle): reformat the hal component by astyle_py

See merge request espressif/esp-idf!49084
2026-06-01 18:27:27 +08:00
Fu Hanxi
63b56a53fb Merge branch 'revert-14816cb7' into 'master'
Revert "Merge branch 'ci/reproducible-build-version-txt' into 'master'"

See merge request espressif/esp-idf!49085
2026-06-01 11:51:55 +02:00
Guillaume Souchere
33e774397c Merge branch 'feat/error-code-registration' into 'master'
feat(esp_common): implement composable error code registration via link-time arrays

Closes IDF-15105 and IDF-15486

See merge request espressif/esp-idf!46125
2026-06-01 09:40:37 +02:00
Igor Udot
7429206efd Revert "Merge branch 'ci/reproducible-build-version-txt' into 'master'"
This reverts merge request !48593
2026-06-01 13:34:36 +08:00
morris
494b2f8de1 ci(astyle): reformat the hal component by astyle_py 2026-06-01 13:29:38 +08:00
Jan Beran
c974f9420b feat(menuconfig): optimize menuconfig speed
When esp-idf-kconfig >= 3.9.0 is installed, we can use the optimized
menuconfig target without the need to preprocess the sdkconfig file by
kconfgen (removing deprecated options - menuconfig - readding deprecated
options).

Also removed unused {menuconfig_depends} from the new target.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 14:57:48 +08:00
Guillaume Souchere
23b8a17d3f feat(ci): add error code registration check to the pre-commit hook 2026-05-28 09:53:33 +02:00
Guillaume Souchere
d670774f5c feat(esp_common): implement composable error code registration via link-time arrays
Refactor the esp_err_to_name() system to decouple esp_common from
higher-level components. Instead of a monolithic generated table,
each component registers its error codes into a dedicated linker
section (.esp_err_msg_table) via idf_define_esp_err_codes() in its
CMakeLists.txt.

New files:
- tools/err_codes_extract.py: extract ESP_ERR_* defines from headers to CSV
- tools/err_codes_to_c.py: generate C source placing entries into linker section
- tools/err_codes_to_rst.py: generate RST documentation from error codes
- tools/cmake/err_codes.cmake: CMake module providing idf_define_esp_err_codes()
- components/esp_common/include/esp_err_codes.h: esp_err_msg_t typedef
- components/esp_common/src/esp_err_to_name_new.c: new lookup using link-time array
- tools/test_apps/build_system/err_codes_check/: CI test app

Changes:
- Remove all optional component dependencies from esp_common/CMakeLists.txt
- Add .esp_err_msg_table section to all 5 linker scripts
- Register error codes in 18 components via idf_define_esp_err_codes()
- Add new scripts to .gitlab/ci/rules.yml build_check patterns
- use new scripts to generate doc and add CI validation
- Update esp_err.rst to add description of composable code registration
2026-05-28 09:53:32 +02: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
a409bb50c5 Merge branch 'bugfix/size_linux_target' into 'master'
fix(tools): dont call idf_size.py for linux target

Closes IDF-6115

See merge request espressif/esp-idf!48937
2026-05-27 15:27:00 +08: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
Erhan Kurubas
5bcaf281e2 Merge branch 'feat/esp_trace_example' into 'master'
esp_trace example library integration

See merge request espressif/esp-idf!48605
2026-05-26 17:38:22 +02:00
Sudeep Mohanty
301eeba878 Merge branch 'task/buildv2_hygiene_and_dep_declarations' into 'master'
fix(components): generic dep-declaration and scope-leakage hygiene exposed by cmakev2

See merge request espressif/esp-idf!48739
2026-05-26 10:18:22 +02:00
Renz Christian Bagaporo
17a9a5cf21 Merge branch 'ci/reenable_unicore_bl_test_h4' into 'master'
test(ci): re-enable skipped ESP32-H4 unicore bootloader tests

Closes IDF-15620

See merge request espressif/esp-idf!48556
2026-05-26 10:45:46 +08:00
Sudeep Mohanty
67a7700383 Merge branch 'task/cmakev2_internal_fixes' into 'master'
fix(cmakev2): internal bug fixes — kconfgen warnings, dep parsing, managed-deps ordering, link templates

See merge request espressif/esp-idf!48740
2026-05-25 16:01:24 +02:00
Ivan Grokhotkov
6589ba9bbb change(version): Update version to v6.2-dev
Start of v6.2 development.
2026-05-25 14:16:08 +02:00
Sudeep Mohanty
6fa141ec36 fix(cmakev2): publish idf_path in __init_idf_path 2026-05-25 12:31:18 +02:00
Sudeep Mohanty
fed8ed784f fix(cmakev2): handle .elf target name in target_add_binary_data
In cmakev1, the executable target is named "${project}.elf". In cmakev2,
the executable is named "${project}" with .elf as the output suffix.
Strip the .elf suffix and look up the bare target name when the original
name doesn't exist.
2026-05-25 12:31:18 +02:00
Sudeep Mohanty
c5e7c137f5 fix(cmakev2/compat): handle quoted REQUIRES and add legacy API shims
Two compatibility fixes:

- idf_component_register: apply separate_arguments to REQUIRES and
  PRIV_REQUIRES after cmake_parse_arguments. Some managed components
  publish CMakeLists.txt with PRIV_REQUIRES "log esp_eth" as a single
  quoted string (e.g. espressif__rtl8201).

- Add register_component() macro and idf_component_add_link_dependency()
  shims for legacy ESP-IDF examples (ULP apps, BLE mesh) and managed
  components (esp_flash_nor).
2026-05-25 12:31:17 +02:00
Sudeep Mohanty
9e20c3ba57 fix(cmakev2/kconfig): suppress transient kconfgen warnings during component manager runs
kconfgen runs while the component manager iterates to convergence.
Those passes operate on partial component sets and emit "unknown
kconfig symbol" warnings for symbols defined in not-yet-downloaded
components — idf-build-apps treats those as build failures.

Suppress kconfgen output on the intermediate passes; only the final
pass against the converged set emits warnings.
2026-05-25 12:31:17 +02:00