Commit Graph

7559 Commits

Author SHA1 Message Date
yinqingzhao
a2179141e0 feat(test_app): add test app for multiple phy init data 2026-09-09 14:40:19 +08:00
Alexey Gerenkov
445d48b773 Merge branch 'tracing_test_fixes_v6.0' into 'release/v6.0'
Tracing test fixes (v6.0)

See merge request espressif/esp-idf!52328
2026-09-08 18:43:46 +08:00
Vojtech Piroch
6e0fc71aed fix(tools): Detect serial port matching the project target
Auto-detect used to pick the first Espressif device, even when it did
not match IDF_TARGET. With several boards attached, flash/monitor could
talk to the wrong chip.

Pass the project target into esptool so unmatched ports are skipped.
Resolve the port after ensure_build_directory() so the target is known.
For monitor on an unconfigured project, probe the connected chip and
pass it directly to idf_monitor without configuring the project.
2026-09-07 14:48:25 +02:00
Erhan Kurubas
69de071692 refactor(examples): group trace examples under examples/system/tracing/
Move 6 trace-related examples (app_trace_basic, app_trace_to_plot,
esp_trace, gcov, sysview_tracing, sysview_tracing_heap_log) from
examples/system/ into a dedicated examples/system/tracing/
subdirectory for better organization.

Update all path references across documentation (en + zh_CN),
build-test-rules, CI configs and component READMEs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZAGzon27T12sGbDPPbZ8G
2026-09-05 03:15:58 +08:00
Alexey Gerenkov
2007a7c8db Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20260831_v6.0' into 'release/v6.0'
feat(tools): update openocd version to v0.12.0-esp32-20260831 (v6.0)

See merge request espressif/esp-idf!52392
2026-09-04 17:32:14 +08:00
Fu Hanxi
14297ada26 Merge branch 'ci/apply-common-scripts-v6.0' into 'release/v6.0'
ci: apply common-scripts refactor (v6.0)

See merge request espressif/esp-idf!50991
2026-09-04 09:33:06 +02:00
Mahavir Jain
64b477f8c9 fix(build): word-align the length symbol of embedded data files
The generated assembly emitted <name>_length immediately after the raw
payload bytes, so the 32-bit word landed misaligned whenever the data
size was not a multiple of 4. Consumers declare it as a 32-bit object
(e.g. `extern const size_t <name>_length` in the ULP firmware loaders),
so the compiler emits an alignment-assuming word load, which is a
misaligned flash read prone to spurious load faults on chips with
SOC_CPU_MISALIGNED_ACCESS_ON_PMP_MISMATCH_ISSUE (ESP32-C6/H2/H21).
2026-09-04 11:06:54 +05:30
Fu Hanxi
3627752631 tests: replace CLI-dependent xfail/skipif conditions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	docs/en/contribute/esp-idf-tests-with-pytest.rst
#	docs/zh_CN/contribute/esp-idf-tests-with-pytest.rst
#	tools/test_apps/system/panic/pytest_panic.py
2026-09-03 20:25:13 +02:00
Fu Hanxi
88b2ffcde6 ci: use main branch of ci/actions/common 2026-09-03 20:25:13 +02:00
Fu Hanxi
fa4a2bfb83 ci(windows): fix fetch submodule path issue 2026-09-03 20:25:13 +02:00
Fu Hanxi
5fd30885b3 ci: apply common-scripts CI refactor 2026-09-03 20:25:12 +02:00
Fu Hanxi
0a86d7b8e7 ci: remove pip-cache and other unused jobs 2026-09-03 20:24:50 +02:00
Fu Hanxi
ddb9fd017c ci: apply idf-ci 1.x 2026-09-03 20:24:50 +02:00
Martin Vychodil
62041d5fc6 Merge branch 'fix/sdmmc_dma_aligned_buffer_leak_v6.0' into 'release/v6.0'
fix(sdmmc): release aligned buffer on card deinit (v6.0)

See merge request espressif/esp-idf!52258
2026-09-03 23:35:18 +08:00
Roland Dobai
186ce4d6b5 Merge branch 'fix/windows_tests_v6.0' into 'release/v6.0'
ci(tools): Fix Windows pytest_build_system idf_copy gitlinks and log_cli hang (v6.0)

See merge request espressif/esp-idf!52334
2026-09-03 16:00:30 +02:00
Jiang Jiang Jian
a9bd063094 Merge branch 'feat/optimize_bootloader_size_v6.0' into 'release/v6.0'
change(bootloader): optimize bootloader size (v6.0)

See merge request espressif/esp-idf!51597
2026-09-03 19:52:35 +08:00
Jiang Jiang Jian
3db3117d2d Merge branch 'feat/cmake_add_partition_flash_binary_function_v6.0' into 'release/v6.0'
feat(esp_partition): Add esp_partition_register_target Cmake function (v6.0)

See merge request espressif/esp-idf!51045
2026-09-03 19:50:11 +08:00
Samuel Obuch
ee7e321352 feat(tools): update openocd version to v0.12.0-esp32-20260831 2026-09-03 12:59:51 +02:00
Roland Dobai
6fee1abe82 Merge branch 'fix/kconfig_test_format_v6.0' into 'release/v6.0'
fix: KConfig test output format (v6.0)

See merge request espressif/esp-idf!52367
2026-09-03 11:11:14 +02:00
Roland Dobai
72263842d0 Merge branch 'fix/mcp_support_major_2_v6.0' into 'release/v6.0'
fix(tools): mcp-server supports python package mcp > 2 (v6.0)

See merge request espressif/esp-idf!51570
2026-09-03 09:46:12 +02:00
Roland Dobai
de3aafb212 Merge branch 'fix/mcp_subprocess_stdin_v6.0' into 'release/v6.0'
fix(tools): detach MCP tool subprocess stdin from JSON-RPC pipe (v6.0)

See merge request espressif/esp-idf!52283
2026-09-03 09:45:39 +02:00
Roland Dobai
d6ccd2a7df Merge branch 'feature/use_zcmp_by_default_v6.0' into 'release/v6.0'
feat(build): add ZCMP workaround post-build check (v6.0)

See merge request espressif/esp-idf!51326
2026-09-03 09:36:29 +02:00
Roland Dobai
b0d2e1c9bf Merge branch 'feat/idf_component_include_optional_v6.0' into 'release/v6.0'
feat(cmakev2/component): add OPTIONAL flag to idf_component_include (v6.0)

See merge request espressif/esp-idf!49571
2026-09-03 09:20:16 +02:00
Daniel Paul
700bd3dd8d fix: KConfig test output format 2026-09-03 09:14:19 +02:00
Jakub Kocka
3bde59c969 refactor(tools): Addressed pre-commit findings 2026-09-02 18:15:04 +02:00
Jakub Kocka
4450c2946b ci(tools): Clip idf.py failure logs so Windows log_cli cannot stall
pytest.ini enables log_cli, so logging the full ninja stdout after a
failed first-time build is one multi-MB ERROR. That hung shard 3/6 for
hours after the hints test. Log the last 80 lines; keep the full output
on the exception and at DEBUG.
2026-09-02 15:17:46 +02:00
Marek Fiala
3b3c7c7abf fix(tools): send mcp-server startup diagnostics to stderr
idf.py mcp-server printed startup, shutdown, and error messages on
stdout. On the stdio MCP transport, stdout is the JSON-RPC channel, so
those non-JSON lines can confuse or break strict clients. Route them to
stderr like the other diagnostics in mcp_ext.py.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 08:10:42 +02:00
Marek Fiala
cac2e57758 fix(tools): detach MCP tool subprocess stdin from JSON-RPC pipe
idf.py mcp-server tool handlers were spawning idf.py without redirecting
stdin, so the child inherited the long-lived MCP JSON-RPC transport and
could hang indefinitely on tools/call. Pass stdin=subprocess.DEVNULL on
every spawn of idf.py.

Closes https://github.com/espressif/esp-idf/issues/18961
2026-09-01 08:10:42 +02:00
Martin Vychodil
76f5dedd99 change(version): Update version to 6.0.3 2026-08-31 19:19:05 +02:00
Adam Múdry
233fa3f948 fix(sdmmc): release aligned DMA buffer on card deinit 2026-08-31 14:14:22 +02:00
Marius Vikhammer
66459e9ddd change(bootloader): optimize bootloader size
Trim bootloader size by moving some logs to DEBUG. Allows
compiling bootloader on P4 with CONFIG_ESPTOOLPY_FLASHMODE_QIO
without changing partition table offset
2026-08-21 10:12:50 +08:00
Adam Múdry
109cd54902 feat(esp_partition): Add esp_partition_flash_binary() CMake function
Add a new CMake function esp_partition_flash_binary() that provides a
unified API for registering partition data binaries to be flashed. It
replaces the direct esptool_py_flash_target calls scattered across
components (spiffs, fatfs, nvs_flash) with a single function that:

- Resolves partition offset from the partition table automatically
- Determines encryption requirements (auto-detect or ALWAYS_PLAINTEXT)
- Creates per-partition flash targets (e.g. idf.py <partition>-flash)
- Optionally includes the binary in `idf.py flash` via FLASH_IN_PROJECT

On the linux target, the function registers binaries for pre-loading
into the emulated flash. A build-time manifest (linux_flash_data.txt)
is generated via file(GENERATE), and partition_linux.c reads it at
runtime to copy each binary into the memory-mapped flash buffer at
the correct offset.

The partition_ops example is updated to use the new function and
includes a custom_partition with pre-built data to demonstrate the
full workflow, including on the linux target.
2026-08-06 14:35:47 +02:00
Martin Vychodil
a017026fc1 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>
(cherry picked from commit ddc9c5fc40)
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-08-05 16:00:45 +02:00
Marek Fiala
85a6c1d8c1 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:36:43 +02:00
Frantisek Hrbata
91576e4c19 feat(cmakev2/component): add OPTIONAL flag to idf_component_include
Add an OPTIONAL flag to idf_component_include so callers can ask
"include this component if it exists" without aborting the build
when the component is unknown.

Without OPTIONAL, the function behaves exactly as before -- it
calls __get_component_interface_or_die and the build aborts on a
miss. With OPTIONAL, the function performs a non-fatal interface
lookup and returns silently if the component is not known. When
combined with INTERFACE <variable>, the variable is set to the
empty string on miss and to the component's interface target on
hit, so callers can write:

    idf_component_include(button OPTIONAL INTERFACE button_iface)
    if(button_iface)
        target_sources(${COMPONENT_TARGET} PRIVATE button_glue.c)
        target_link_libraries(${COMPONENT_TARGET} PRIVATE ${button_iface})
    endif()

This gives consumers a public, non-fatal way to wire up integrations
with components that may or may not be in the build (managed
dependencies pulled in only by some board configurations, optional
feature glue, etc.) without reaching into the private
__get_component_interface helper or doing dual-namespace
COMPONENTS_DISCOVERED checks against both <name> and <ns>__<name>
forms.

Backward compatible: existing call sites do not pass OPTIONAL and
continue to fail loudly on miss.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-07-31 19:32:20 +08:00
Alexey Lapshin
fbaf869fb9 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-07-30 12:14:54 +07:00
Mahavir Jain
c9fc9d6103 Merge branch 'fix/esp_image_format_v6.0' into 'release/v6.0'
fix(esp_image_format): Fix some memory-safety issues (v6.0)

See merge request espressif/esp-idf!50180
2026-07-24 17:16:22 +05:30
morris
16c8013af4 feat(build): support aligned embedded binary data
Allow callers to align embedded binary start symbols for DMA-capable
assets.
2026-07-24 11:48:17 +08:00
Jiang Jiang Jian
f44059890c Merge branch 'feature/upgrade-esp-rom-elfs_v6.0' into 'release/v6.0'
feat(tools): tools: update esp-rom-elf to version 20260528 (v6.0)

See merge request espressif/esp-idf!50847
2026-07-23 18:20:13 +08:00
Konstantin Kondrashov
666dc3b438 fix(bootloader): increase partition table offset for ESP32-P4 in affected test configs 2026-07-21 13:35:35 +03:00
Alexey Gerenkov
c0992a3a5a Merge branch 'sysview_test_fixes_v6.0' into 'release/v6.0'
Sysview test fixes v6.0

See merge request espressif/esp-idf!50729
2026-07-20 18:45:30 +08:00
Alexey Lapshin
795b2ec96f feat(tools): tools: update esp-rom-elf to version 20260528
Closes https://github.com/espressif/esp-idf/issues/18755
2026-07-20 10:58:29 +07:00
Jiang Jiang Jian
04ccdc72e0 Merge branch 'feature/update-openocd-to-v0.12.0-esp32-20260703_v6.0' into 'release/v6.0'
feat(tools): update openocd version to v0.12.0-esp32-20260703 (v6.0)

See merge request espressif/esp-idf!50503
2026-07-20 10:30:15 +08:00
Jiang Jiang Jian
55afa16a8a Merge branch 'backport/bdl_ioctl_checker_v6.0' into 'release/v6.0'
feat(esp_blockdev): add build-time ioctl command reservation overlap checker (v6.0 backport)

See merge request espressif/esp-idf!50217
2026-07-20 10:21:59 +08:00
morris
4edbc85a4a Merge branch 'bugfix/uart_sw_flow_ctrl_xoff_char_v6.0' into 'release/v6.0'
fix(uart): fix uart sw flow ctrl XOFF char write to wrong reg on ESP32C6 (v6.0)

See merge request espressif/esp-idf!50524
2026-07-15 11:52:07 +08:00
Erhan Kurubas
f5cca63bb0 test(usb_serial_jtag): pin console uart to ttyUSBx port 2026-07-14 12:15:35 +02:00
Chen Chen
269d582181 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:39 +08:00
Vincent Hamp
f6ed4a607c fix(mocks): add missing esp_hal_* includes 2026-07-14 17:30:39 +08:00
Guo Zifan
7d904f636f docs(ble): rename BLE Log Console migration notice
(cherry picked from commit 9fb982d53b)

Co-authored-by: guozifan <guozifan@espressif.com>
2026-07-10 10:43:57 +08:00
Guo Zifan
6621170151 docs(ble): update BLE Log Console repository link
(cherry picked from commit ce515cbc09)

Co-authored-by: guozifan <guozifan@espressif.com>
2026-07-10 10:43:57 +08:00