Commit Graph

7935 Commits

Author SHA1 Message Date
Fu Hanxi
3d74dcead1 Merge branch 'feat/build_size_metrics_apps_on_master_branch' into 'master'
ci: move app-size-metrics job to ci/actions/common repo

See merge request espressif/esp-idf!51793
2026-08-18 10:26:55 +02:00
morris
3438867a73 Merge branch 'lld_orphan' into 'master'
esp_system: enable linking with LLD on RISC-V targets

Closes LLVM-216

See merge request espressif/esp-idf!48712
2026-08-17 14:40:36 +08:00
Evgeny Torbin
1733fbdcd6 ci: move app-size-metrics job to ci/actions/common repo 2026-08-14 15:47:39 +02:00
Fu Hanxi
807adb6ca6 Merge branch 'ci/use-latest-common-repo' into 'master'
ci: use latest ci/actions/common repo

See merge request espressif/esp-idf!51759
2026-08-14 10:37:49 +02:00
Marius Vikhammer
aaad158b85 ci(precommit): fixed readme issue found by precommit in ota size metric 2026-08-14 08:19:23 +02:00
Stefan Stipanovic
d0ae774d59 fix(esp_system): enable linking with LLD on RISC-V targets 2026-08-13 21:23:36 +02:00
Fu Hanxi
cfca633f01 ci: use main branch of ci/actions/common 2026-08-13 15:26:02 +02:00
Mahavir Jain
8c007f0e03 Merge branch 'feat/bootloader-mbedtls-split-final' into 'master'
feat(esp_image_verify): split image verification out of bootloader_support

Closes IDF-8577 and IDFGH-17033

See merge request espressif/esp-idf!48383
2026-08-13 08:45:58 +05:30
Mahavir Jain
9006fc70ac 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-08-12 08:42:49 +05:30
Ashish Sharma
e7af5c69d9 feat(esp_image_verify): split image verification out of bootloader_support 2026-08-12 08:39:18 +05:30
Ashish Sharma
8589d9df25 fix(build): prepare dependents for bootloader_support dropping mbedtls
bootloader_support is about to stop pulling mbedtls (and app_update) into
every build graph, so components and apps that relied on those transitive
edges must own their dependencies

Closes https://github.com/espressif/esp-idf/issues/18072
Related https://github.com/espressif/esp-idf/issues/18778
2026-08-12 08:39:18 +05:30
Marius Vikhammer
3887bf6848 Merge branch 'ci/metric_apps' into 'master'
ci(size_metrics): add more size metrics apps

See merge request espressif/esp-idf!51622
2026-08-10 19:50:14 +08:00
Frantisek Hrbata
e9cf6abc31 Merge branch 'fix/harden_empty_toolchain_output' into 'master'
fix: harden build against empty toolchain output

Closes IDFGH-17820

See merge request espressif/esp-idf!50136
2026-08-10 09:31:40 +02:00
Frantisek Hrbata
a9de9dc172 Merge branch 'fix/ldgen_template_fingerprint' into 'master'
fix(ldgen): add the linker template to the generation fingerprint

See merge request espressif/esp-idf!51620
2026-08-10 08:31:03 +02:00
Marius Vikhammer
dd089bacb2 ci(size_metrics): add more size metrics apps 2026-08-07 13:49:28 +02:00
Renz Christian Bagaporo
1c183dc089 Merge branch 'fix/ldgen_stale_output' into 'master'
fix(cmake): track transitive includes in linker script preprocessing

Closes IDF-16033

See merge request espressif/esp-idf!51580
2026-08-07 16:44:17 +08:00
Frantisek Hrbata
5d4e96aeb8 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-07 10:39:10 +02:00
Marius Vikhammer
81f6360e4d Merge branch 'feat/optimize_bootloader_size' into 'master'
change(bootloader): optimize bootloader size

See merge request espressif/esp-idf!51573
2026-08-06 22:06:38 +08:00
Alexey Lapshin
366ce3ebed Merge branch 'fix/kasan_heap_alignment' into 'master'
fix(heap): preserve aligned allocation with KASAN

See merge request espressif/esp-idf!51186
2026-08-06 14:06:58 +04:00
Marius Vikhammer
47262f8e6b 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-06 10:01:36 +02:00
Mahavir Jain
2495e37a48 Merge branch 'feat/pma_pmp_lock_policy' into 'master'
Stop locking PMP in the bootloader and freeze the entry layout

See merge request espressif/esp-idf!50326
2026-08-06 11:31:39 +05:30
Renz Bagaporo
a3b304f380 fix(cmake): track linker script preprocessor includes 2026-08-06 09:18:13 +09:00
Renz Bagaporo
dfc3f54445 test(cmake): verify included linker scripts trigger preprocessing 2026-08-06 09:18:13 +09:00
Fu Hanxi
ecdf3bfb3c ci: fix test_patch_buildv2_child_pipeline 2026-08-05 23:34:14 +02:00
Marek Fiala
ee6b0ed9ae Merge branch 'fix/mcp_support_major_2' into 'master'
fix(tools): mcp-server supports python package mcp > 2

Closes IDFGH-18056

See merge request espressif/esp-idf!51517
2026-08-05 21:18:31 +08:00
Sudeep Mohanty
514f69c1f3 Merge branch 'fix/buildv2_fake_pass_pipeline' into 'master'
ci(buildv2): skip patching the fake_pass build child pipeline

Closes ITOPS-314 and IDF-16025

See merge request espressif/esp-idf!51259
2026-08-05 15:16:40 +02:00
Frantisek Hrbata
5c5d15cfc7 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-05 20:58:36 +08:00
Michael (XIAO Xufeng)
b12870c43d Merge branch 'sdio-example-4bit-bringup' into 'master'
example(sdio_slave): add docs and examples for SI testing

See merge request espressif/esp-idf!49371
2026-08-05 16:48:38 +08:00
Sudeep Mohanty
cbc4dff964 Merge branch 'feat/ulp_custom_linker_support' into 'master'
ULP: Support custom LP Core linker layouts via the LINKER option

Closes IDF-12902

See merge request espressif/esp-idf!49991
2026-08-05 10:10:32 +02:00
Evgeny Torbin
06cda3498f Merge branch 'ci/generate_app_size_report' into 'master'
ci: generate app size report

Closes CII-224 and CII-149

See merge request espressif/esp-idf!51237
2026-08-05 16:09:29 +08:00
Michael.B
0d9193fa98 feat(sdio): add hw_test example for signal integrity checks 2026-08-05 13:22:15 +08:00
Sudeep Mohanty
60dc69391b Merge branch 'feat/buildv2_kasan' into 'master'
feat(build): support KASAN in the build system v2 (cmakev2)

See merge request espressif/esp-idf!51408
2026-08-04 17:34:00 +02:00
Alexey Gerenkov
72732994ef Merge branch 'feature/enable_atomic_lock_policy_on_riscv' into 'master'
feat(build): add CONFIG_COMPILER_CXX_ATOMIC_LOCK_POLICY option

See merge request espressif/esp-idf!49913
2026-08-04 20:05:40 +08:00
Evgeny Torbin
6724d18150 ci: include app size report from ci common actions repo 2026-08-04 12:37:34 +02:00
Marek Fiala
9060b31790 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-04 11:25:08 +02:00
Sudeep Mohanty
5e7c5ed2cb fix(buildv2): include component-set LINK_OPTIONS as a GENERATOR_EXPRESSION
idf_build_library() captured the LINK_OPTIONS build property before including
the components, so a link option a component appended while it was processed was
dropped from the executable link. Read the property as a generator expression so
these options are included.
2026-08-03 17:31:18 +02:00
Sudeep Mohanty
9c778c954c feat(build): support KASAN in the build system v2 (cmakev2)
Mirror Kernel Address Sanitizer support into cmakev2 so that
CONFIG_COMPILER_KASAN instruments application code the same way build system v1
does.
2026-08-03 17:31:17 +02:00
Sudeep Mohanty
cc799dbcc7 test(kasan): re-enable kasan_test under build system v2 2026-08-03 17:29:00 +02:00
Roland Dobai
b1d066dbd4 Merge branch 'contrib/github_pr_18871' into 'master'
feat(tools): add -j/--jobs option to idf.py (GitHub PR)

Closes IDFGH-18013

See merge request espressif/esp-idf!51409
2026-08-03 11:25:52 +02:00
Alexey Lapshin
2c0ecc64fa fix(heap): preserve aligned allocation with KASAN
Account for the left redzone when aligning user pointers.
Add regression coverage for KASAN-enabled allocations.
2026-08-03 13:13:16 +07:00
Sudeep Mohanty
7c3b82562a feat(ulp): support custom LP-core linker layouts via the LINKER_LAYOUT option 2026-07-31 14:48:52 +02:00
Frantisek Hrbata
27a72e4660 style(tools): reformat global_options.py with ruff-format
This file predates the adoption of ruff-format and was never reformatted,
because pre-commit only runs on the files touched by a change. GitHub PR
#18871 bumps the copyright year here, which pulls the file into the hook's
scope and makes check_pre_commit fail on a pre-existing formatting
violation unrelated to that change.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-07-31 12:49:10 +02:00
Renz Christian Bagaporo
7054ec851c Merge branch 'feat/cmakev2_ulp_legacy_shim' into 'master'
feat(ulp): build all legacy ULP projects through CMakev2

See merge request espressif/esp-idf!50143
2026-07-31 07:10:43 +08:00
Renz Bagaporo
2fe7e0f047 fix(ulp): preserve legacy ulp_embed_binary link order
Legacy ulp_embed_binary() call-site sources were attached directly to the CMake v2 child executable. However, the ULP runtime is linked with WHOLE_ARCHIVE through target_link_options(), which CMake emits before executable objects. This reversed the CMake v1 order, changed ULP code placement, and allowed runtime weak definitions to take precedence over legacy strong handlers.

Build the call-site sources as a dedicated static archive and place its whole-archive option before the runtime archive. Preserve the parent sdkconfig and include view, including FSM-specific include behavior, without generating a synthetic component tree.

Factor linker-specific whole-archive handling into a shared CMake v2 helper for GNU, Darwin, and ULP FSM linkers. Link the archive target normally as well so CMake tracks build and relink dependencies when a legacy ULP source changes.
2026-07-30 08:02:26 +09:00
Marius Vikhammer
873d612fde Merge branch 'ci/add_base_size_metric_apps' into 'master'
ci(size_metrics): add base size metric test apps

See merge request espressif/esp-idf!46208
2026-07-29 20:50:13 +08:00
Marius Vikhammer
19aca52f08 feat(size_metrics): add size metrics test apps
Add test apps for binary size tracking:
- esp_timer size_metrics app with minimal/full sdkconfig variants
- minimal_baseline app to establish the platform binary size floor
2026-07-29 11:40:55 +02:00
harshal.patil
dc6939e583 test(esp_system): run memory protection panic tests on ESP32-P4 rev < 3.0 2026-07-29 11:41:22 +05:30
Renz Bagaporo
1f5cba3070 fix(ulp): clarify buildv2 child marker
Rename the internal ULP child-build marker to __ULP_BUILDV2 so component CMake files make the build-system scope explicit.

Document that the marker is currently set only by the IDF_BUILD_V2 ULP child path.
2026-07-29 13:08:23 +09:00
Renz Bagaporo
83cdcc1da3 fix(ulp): use builtin v2 project for legacy embed
Route ulp_embed_binary() through a built-in CMake v2 default ULP project instead of generating a compatibility project with a synthetic main component.

Attach legacy ULP sources directly to the ULP executable, pass the parent component include view through the existing ULP_S_SOURCES/COMPONENT_* channel, and remove the generated legacy project templates plus the component path ownership validation bypass they required.

Update the build-system coverage to assert that the builtin child project builds and rebuilds when parent-owned ULP sources change.
2026-07-29 13:08:23 +09:00
Renz Bagaporo
dc813d91ea test(build_system): fix buildv2 pytest coverage
Allow the reconfigure test to assert the buildv2 activation message when pytest runs with --buildv2.

Make the ULP API probe use CMake-friendly forward-slash paths and an explicit ULP toolchain/custom-toolchain setting so the direct cmake configure works on Windows as well as Linux.
2026-07-29 13:08:23 +09:00