Commit Graph

7779 Commits

Author SHA1 Message Date
Fu Hanxi
0a0f6ff9d1 tests: replace CLI-dependent xfail/skipif conditions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-27 09:25:42 +02:00
Fu Hanxi
62cca9b9e0 ci: use main branch of ci/actions/common 2026-08-27 09:25:42 +02:00
Fu Hanxi
d008f9456b ci: remove pip-cache and other unused jobs 2026-08-27 09:25:41 +02:00
Fu Hanxi
321dda29ff ci: apply common-scripts CI refactor (v6.1) 2026-08-27 09:14:23 +02:00
Roland Dobai
138482998d Merge branch 'feature/use_zcmp_by_default_v6.1' into 'release/v6.1'
feat(build): add ZCMP workaround post-build check (v6.1)

See merge request espressif/esp-idf!51325
2026-08-27 08:24:39 +02:00
Roland Dobai
b737501fd4 Merge branch 'bugfix/cmakev2-coredump-default-component_v6.1' into 'release/v6.1'
fix(cmakev2): include config-selected default components (v6.1)

See merge request espressif/esp-idf!51930
2026-08-27 08:21:54 +02:00
Roland Dobai
4d777fd05a Merge branch 'fix/harden_empty_toolchain_output_v6.1' into 'release/v6.1'
fix: harden build against empty toolchain output (v6.1)

See merge request espressif/esp-idf!51643
2026-08-27 08:20:56 +02:00
Roland Dobai
46e2563b4b Merge branch 'fix/buildv2_fake_pass_pipeline_v6.1' into 'release/v6.1'
ci(buildv2): skip patching the fake_pass build child pipeline (v6.1)

See merge request espressif/esp-idf!51571
2026-08-27 08:19:13 +02:00
Roland Dobai
e30658c10c Merge branch 'chore/remove_old_root_managed_components_tests_v6.1' into 'release/v6.1'
chore: Remove old root managed components tests (v6.1)

See merge request espressif/esp-idf!51075
2026-08-27 08:17:44 +02:00
Roland Dobai
7c890fccf7 Merge branch 'feat/idf_component_include_optional_v6.1' into 'release/v6.1'
feat(cmakev2/component): add OPTIONAL flag to idf_component_include (v6.1)

See merge request espressif/esp-idf!49570
2026-08-27 08:17:12 +02:00
Euripedes Rocha
cdec505ebd Merge branch 'feat/eth_test_component_v6.1' into 'release/v6.1'
feat(esp_eth): updated test_apps to use Ethernet test component (v6.1)

See merge request espressif/esp-idf!49658
2026-08-27 08:07:55 +02:00
Roland Dobai
5a5c367ee4 Merge branch 'fix/mcp_support_major_2_v6.1' into 'release/v6.1'
fix(tools): mcp-server supports python package mcp > 2 (v6.1)

See merge request espressif/esp-idf!51569
2026-08-27 08:06:47 +02:00
Marius Vikhammer
702f6354ec fix(cmakev2): include config-selected default components 2026-08-21 10:24:17 +08:00
Sudeep Mohanty
00aea6d1f0 ci(buildv2): collect target tests with IDF_BUILD_V2 active 2026-08-20 14:00:26 +02:00
Sudeep Mohanty
c619ab492c ci(buildv2): skip patching the fake_pass build child pipeline
idf-ci emits a skip pipeline containing only a fake_pass job, with no
include of test_child_pipeline.yml, when the modified files match no
buildable apps. patch_buildv2_child_pipeline.py redefined
generate_pytest_child_pipeline unconditionally, assuming the included
template supplied its tags, image and assign_test stage via keyword
merge. With the template absent, the injected job was bare: no tags,
default test stage. It was scheduled on the wrong runner and failed,
turning the allow_failure build_child_pipeline_buildv2 bridge red on
every buildv2 MR whose changes produce an empty app matrix.

Return early when a fake_pass job is present so the child pipeline is
left untouched and skips, matching the default build path. Add a unit
test for the patch script and a host_test job to run it.
2026-08-20 10:14:46 +02:00
Ondrej Kosta
5e4f3308e4 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-08-13 20:53:55 +08:00
Frantisek Hrbata
86c4c63780 fix: harden build against empty toolchain output
On some Windows systems, antivirus, endpoint-security or DLP/encryption
software intercepts short-lived toolchain processes and strips their
stdout when the build captures it through a pipe, while the same command
prints its output normally when run by hand. The tool exits successfully
but returns nothing, and each build step that reads toolchain output then
failed with a different, cryptic error far from the real cause:

- CMake configuration aborted with "Unknown arguments specified" in
  components/xtensa/project_include.cmake, or "check_expected_tool_version
  invoked with incorrect arguments" in components/esp_common.
- ldgen turned the empty objdump output into an opaque pyparsing
  "Expected 'In archive'" traceback.
- idf_tools.py silently reported the compiler/debugger version as
  "unknown", sending users into a fruitless reinstall loop.

Detect the empty result at each consumer and fail (or warn) with an
actionable message that names the likely cause and the remedy:

- tools/cmake/compiler_query.cmake: new __compiler_query() helper runs a
  compiler query and fails with a clear error on empty or failed output.
  It is a standalone module included by both the cmakev1 and cmakev2
  utilities, since the esp_common and xtensa project_include.cmake that
  call it are shared by both build systems. The xtensa if() arguments are
  now quoted so an empty result no longer collapses into a parse error.
- tools/ldgen/ldgen.py: _run_objdump() rejects empty objdump output, and
  non-empty-but-unparsable section info is caught and re-raised as a clear
  LdGenFailure instead of a raw pyparsing traceback.
- tools/idf_tools.py: empty version output now warns with the cause and
  returns UNKNOWN_VERSION instead of silently reporting "unknown".

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

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-08-10 09:05:01 +02:00
Frantisek Hrbata
da926220bd fix(ldgen): add the linker template to the generation fingerprint
ldgen skips regeneration when a fingerprint over the section names, the
linker fragment files, sdkconfig and Kconfig is unchanged. The linker
script template was not part of that fingerprint, even though everything
outside its mapping placeholders is copied into the generated script
verbatim.

The build system regenerates the preprocessed template whenever any of
its inputs changes, not only when a linker fragment changes. When such a
change reaches ldgen but leaves the section names alone, the fingerprint
still matches, generation is skipped, and the image is linked against the
previously generated script. The skip path updates the mtime of the
output, so nothing in the build output shows that the change was dropped.

Add the template to the fingerprint so that regenerating it always
regenerates the linker script.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-08-10 08:30:31 +02:00
Marek Fiala
6d8d63da51 fix(tools): support mcp Python SDK 2.0 for mcp-server
FastMCP was renamed to MCPServer in mcp 2.0, which made idf.py mcp-server
report a false "MCP dependencies not available" error. Prefer MCPServer
and keep a FastMCP fallback for mcp 1.x.

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

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 15:35:49 +02:00
Alexey Lapshin
a494009a0c feat(build): add RISC-V ZCMP post-link workaround check
Validate linked RISC-V executables when
CONFIG_COMPILER_ENABLE_RISCV_ZCMP is enabled on affected chips.
Disassemble each function and reject mstatus.MIE clears that lack an
earlier mintthresh write of 0xff.

Handle csrrci, csrrw, and register-mask csrrc patterns while ignoring
csrrs. Add build-only coverage for valid and invalid sequences with
CMake v1 and v2.

Stop the hardware stack guard before switching stacks during restart,
and keep ZCMP disabled for TEE test apps that still require the
workaround.
2026-08-03 14:10:00 +08:00
morris
f6aed42a49 Merge branch 'contrib/github_pr_18832_v6.1' into 'release/v6.1'
fix(mocks): add missing `esp_hal_*` includes (GitHub PR) (v6.1)

See merge request espressif/esp-idf!50726
2026-07-29 19:00:31 +08:00
Daniel Paul
c6b5bd08b3 chore: Remove old root managed components tests 2026-07-23 00:41:09 +02:00
Jiang Jiang Jian
e61a30edce Merge branch 'backport/support-esp32s31-dfu-v6.1' into 'release/v6.1'
Feat/support esp32s31 dfu (v6.1)

See merge request espressif/esp-idf!50863
2026-07-18 08:07:22 +08:00
Jiang Jiang Jian
a43c51681a Merge branch 'task/buildv2_full_pipeline_v6.1' into 'release/v6.1'
Enable full buildv2 pipeline (v6.1)

See merge request espressif/esp-idf!50351
2026-07-17 18:20:09 +08:00
Jiang Guang Ming
5c3306ac04 fix(dfu): retry dfu-util flash on macOS detach failure
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:09:20 +08:00
JiangGuangMing
a37b9efc90 feat: support esp32s31 dfu feature 2026-07-17 11:09:20 +08:00
Jiang Jiang Jian
f8e6e94dca Merge branch 'feat/usb_dfu_console_soc_caps_backport_v6.1' into 'release/v6.1'
feat(soc): add USB DFU and OTG console caps (backport v6.1)

See merge request espressif/esp-idf!49580
2026-07-17 10:30:26 +08:00
Jiang Jiang Jian
947e534927 Merge branch 'fix/mmap_cache_flash_wr_v6.1' into 'release/v6.1'
fix(mmap): fixed mmap read data wrong when flash being erased/written and cache not disabled (v6.1)

See merge request espressif/esp-idf!50117
2026-07-17 10:30:14 +08:00
Aditya Patwardhan
9dc17f98b0 Merge branch 'backport/44987_v6.1' into 'release/v6.1'
feat(esp-tls): Added a PSA driver for Secure Element (backport v6.1)

See merge request espressif/esp-idf!50334
2026-07-16 15:37:49 +05:30
Tomas Rezucha
32e1303c3e feat(tools): Add 'check' field to idf.py actions 2026-07-16 12:16:11 +08:00
igor.masar
f7e24571ea 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-07-16 12:16:11 +08:00
Jiang Jiang Jian
8f45ea4dcb Merge branch 'cleanup/remove-idf_test-component_v6.1' into 'release/v6.1'
chore: remove unused idf_test component (v6.1)

See merge request espressif/esp-idf!50650
2026-07-16 11:39:15 +08:00
Xiao Xufeng
3e8389cc31 fix(mmap): fixed some API read wrong data via mmap when flash being erased/written while XIP on PSRAM
Before:

The cache won't be disabled when XIP on psram. But during flash
erasing/programming, read data will be courrupt.

When XIP in psram is enabled, the image is not mapped to the cache so
usually there will be no flash access. The only way to read from flash
is via the driver or use mmap. The driver has protection during erasing,
while th mmap region not.

Now:

Mmap APIs provide a flag to make mmap->unmap region mutually exclusive
to flash erase/programming when XIP from psram. SPI Flash write APIs
will benefit from this. When the flag is used, no concurrent access to
mapped region will happen while writing; otherwise the cache will be
disable to avoid data corruption.

Most ESP-IDF APIs calls mmap with this flag. As for users calling
mmap-like APIs directly, they can choose whether to enable this by a
flag.

Closes https://github.com/espressif/esp-idf/issues/14897
2026-07-15 18:57:08 +08:00
Chen Chen
0fbbcd7271 fix: update flash encryption mock build check
Use a non-deprecated bootloader support API in the mock build test.
Keep the test focused on validating the generated bootloader support mock.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-14 17:30:29 +08:00
Vincent Hamp
9980a9f53a fix(mocks): add missing esp_hal_* includes 2026-07-14 17:30:29 +08:00
Samuel Obuch
88f7f94bc9 feat(tools): update openocd version to v0.12.0-esp32-20260703 2026-07-13 09:53:58 +02:00
morris
1fb5dafdad chore: remove unused idf_test component
The idf_test component was previously cleaned up but accidentally
reintroduced when adding esp32s31 support. It only contained an empty
header file (idf_performance_target.h) with no references anywhere
in the codebase.

Also removes the corresponding entry from astyle-rules.yml.
2026-07-13 10:12:13 +08:00
Sudeep Mohanty
0a89c2e432 fix(test_apps): override config defaults unused by these tests
These tests enable features they do not use -- the VFS console, Wi-Fi task core pinning, and
the DS peripheral -- which shift memory layout, interrupt allocation, and peripheral access
enough to fail them. Override the unused options in each test's sdkconfig and ignore the
resulting unknown-symbol build warnings.
2026-07-03 19:18:42 +02:00
Sudeep Mohanty
0e662bfa7d fix(gdbinit): build elf path from EXECUTABLE_NAME, not the target name
The EXECUTABLE build property holds a CMake target name, not a filesystem
path. Under Build system v1 the target happens to be created as
"<project>.elf", so concatenating BUILD_DIR with EXECUTABLE produced a valid
elf path by coincidence. Under Build system v2 the target is just "<project>"
and the elf is written as "<project>.elf" via CMake's executable suffix, so
the same concatenation pointed gdb at a non-existent file.

Construct the path explicitly from EXECUTABLE_NAME plus the .elf suffix so
the gdbinit consumer no longer depends on the producer naming its target
after the output file.
2026-07-03 19:18:42 +02:00
Sudeep Mohanty
2119b3c7d2 fix(cmakev2/kconfig): re-resolve SDKCONFIG_DEFAULTS lazily under Build system v1 shim
The cmakev2 path snapshots SDKCONFIG_DEFAULTS once during early init. Build
system v1 apps that mutate SDKCONFIG_DEFAULTS after `include(project.cmake)`
but before `project()` (e.g. `list(PREPEND SDKCONFIG_DEFAULTS ...)` to inject
tools/test_apps/configs/sdkconfig.debug_helpers) miss those mutations when
the shim drives the cmakev2 path, because the snapshot was taken before the
mutation.

Re-resolve SDKCONFIG_DEFAULTS at sdkconfig-generation time when
__V1_COMPAT_SHIM is active so the late-mutated value is honored. Native
cmakev2 apps still use the property-based contract via
idf_build_set_property(SDKCONFIG_DEFAULTS ... APPEND).
2026-07-03 19:18:42 +02:00
Sudeep Mohanty
abc963d6ca ci(buildv2): add build/QEMU/Linux jobs for Build system v2
Add the parallel set of CI jobs that exercise the cmakev2 path end-to-end
via the IDF_BUILD_V2 shim. All jobs are gated on the `buildv2` MR label
with `allow_failure: true` so unrelated MRs do not pay for the extra
build matrix.

- `.gitlab/ci/build.yml`: add the buildv2 child build pipeline that
  re-runs the full app build matrix with IDF_BUILD_V2=y, plus the
  Windows buildv2 build job. The generator script injects IDF_BUILD_V2
  and a PIPELINE_COMMIT_SHA suffix into each child job and broadens
  target_test job filters so v1 and buildv2 artifacts upload to distinct
  s3 cache paths and each child pipeline tests its own binary.
- `.gitlab/ci/host-test.yml`: add the QEMU (esp32, esp32c3) and Linux
  pytest buildv2 jobs.
- `.idf_build_apps.toml`: parameterize build_dir with BUILDV2_DIR_SUFFIX
  (set to _v2 only on the buildv2 pipeline).
2026-07-03 19:18:42 +02:00
Jiang Jiang Jian
6d021fcbce Merge branch 'task/buildv2_shim_and_ci_v6.1' into 'release/v6.1'
feat(cmakev2): IDF_BUILD_V2 shim + v1-compat layer + buildv2 CI (v6.1)

See merge request espressif/esp-idf!49725
2026-07-03 23:37:50 +08:00
Jiang Jiang Jian
e3feb73053 Merge branch 'task/buildv2_hygiene_and_dep_declarations_v6.1' into 'release/v6.1'
fix(components): generic dep-declaration and scope-leakage hygiene exposed by cmakev2 (v6.1)

See merge request espressif/esp-idf!48904
2026-07-03 17:47:24 +08:00
Aditya Patwardhan
0688fe6f23 fix(esp-tls): update secure element build hint for PSA integration
(cherry picked from commit 5f1074045f)
2026-07-02 11:41:49 +05:30
Aditya Patwardhan
72b2e4f4fd fix(esp-tls): address MR review comments for SE PSA driver
- esp_tls_mbedtls: require cert when PSA-backed server/client key is set
- esp_tls_mbedtls: drop redundant pk_init/x509_crt_init (calloc handles it)
- psa SE driver: copy callbacks/opaque_key by value (no lifetime coupling)
- psa SE driver: replace atomic CAS with simple null check on register
- psa SE driver: use sig_len from sign callback with bounds validation
- psa SE driver: validate pubkey_len returned by export_pubkey callback
- psa SE driver: check hash sub-alg in RSA PKCS1V15 branch of validate_request
- psa SE driver: align secure_element_register_callbacks doc with value-copy impl
- esp_https_server: initialize server_key in HTTPD_SSL_CONFIG_DEFAULT
- mbedtls: move SECURE_ELEMENT_DRIVER_ENABLED to esp_config.h for parity
  with ESP_ECDSA_DRIVER_ENABLED; drop target_compile_definitions
- docs: fix esp_tls_cfg_t -> esp_http_client_config_t cross-reference
- docs: check psa_import_key() status in ESP-TLS PSA example
- hints/error_output: point at CONFIG_MBEDTLS_SECURE_ELEMENT_DRIVER_ENABLED

(cherry picked from commit 08b567ef3b)
2026-07-02 11:41:49 +05:30
Aditya Patwardhan
2325a727d8 feat(esp-tls): Add unified private key interface via esp_key_config_t
Add ESP_KEY_SOURCE_BUFFER and ESP_KEY_SOURCE_PSA key sources so all
hardware backends (DS, ECDSA, secure element) are accessed via PSA
key IDs through a single esp_tls_cfg_t.client_key field.

(cherry picked from commit 36090b7161)
2026-07-02 11:41:48 +05:30
Sudeep Mohanty
ac527f3192 fix(test_apps/memprot): declare esp_hal_wdt as a private requirement of main
main/{esp32s2,esp32c3,esp32s3}/test_panic.c uses WDT registers from
esp_hal_wdt. Declare it explicitly so the build works under cmakev2's
strict component isolation.
2026-07-01 19:59:05 +08:00
Sudeep Mohanty
658df32a06 fix(test_apps/gdb): declare spi_flash as a private requirement of main
main/hello_world_main.c uses spi_flash headers. Declare spi_flash in
PRIV_REQUIRES so the build works under cmakev2's strict component
isolation.
2026-07-01 19:59:05 +08:00
harshal.patil
dd84cd7f10 fix(panic): handle absent IROM/DROM alignment gap in spiram-xip memprot tests
The spiram-xip IROM/DROM alignment tests assumed the XIP region always
leaves an alignment gap before the next MMU page: they executed into the
gap and expected an instruction access fault followed by a register dump.
When the section ends exactly on an MMU page boundary there is no gap - the
device prints "<IROM/DROM> alignment gap not added into heap" and returns,
the framework restarts cleanly (esp_restart_noos, no panic), and the test
timed out waiting for a register dump.
2026-07-01 10:59:50 +05:30
Jiang Jiang Jian
1e58083bdf Merge branch 'ci/backport-master-6.1-2026-06-29' into 'release/v6.1'
ci: backport master ci to 6.1 (2026-06-29)

See merge request espressif/esp-idf!50157
2026-06-30 14:25:15 +08:00