Commit Graph

7906 Commits

Author SHA1 Message Date
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
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
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
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
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
Renz Bagaporo
c925f6bcc6 fix(ulp): restore legacy LP-core child link behavior
Preserve all linker scripts passed to target_linker_script() so LP-core child builds keep the full esp32p4 LP ROM script set instead of only the first script.

Link the ULP runtime component as WHOLE_ARCHIVE for ULP child builds, matching the legacy helper behavior where runtime sources were added directly to the executable. This keeps strong runtime handlers such as ulp_lp_core_panic_handler from being skipped in favor of weak defaults from already-extracted archive objects.

Validated with the esp32p4 lp_core_hp_uart panic and LP-ROM pytest cases, plus the focused local/CI build_all shape for the app.
2026-07-29 13:08:23 +09:00
Renz Bagaporo
e331c8e310 fix(cmakev2): suppress MINIMAL_BUILD warning in v1 shim 2026-07-29 13:08:22 +09:00
Renz Bagaporo
a91a316449 ci(ulp): re-enable legacy ULP buildv2 jobs 2026-07-29 13:08:22 +09:00
Renz Bagaporo
48374cb8fa test(build_system): add CMake v2 ULP legacy shim coverage 2026-07-29 13:08:22 +09:00
Renz Bagaporo
288b9a6e00 feat(ulp): build legacy ULP APIs through CMake v2 shim 2026-07-29 13:08:22 +09:00
Alexey Lapshin
77420a6f78 Merge branch 'feature/use_zcmp_by_default' into 'master'
feat(build): add ZCMP workaround post-build check

See merge request espressif/esp-idf!49764
2026-07-28 14:00:37 +04:00
Sudeep Mohanty
e69d5bb697 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-07-28 10:47:57 +02:00
Erhan Kurubas
19a27980a5 refactor(examples): group trace examples under examples/system/tracing/
Move 7 trace-related examples (app_trace_basic, app_trace_to_plot,
esp_trace_custom_library, function_tracing, 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, Kconfig, and component READMEs.
2026-07-27 23:56:02 +03:00
Alexey Lapshin
b3ae652f21 feat(build): add CONFIG_COMPILER_CXX_ATOMIC_LOCK_POLICY option
libstdc++ selects between a lock-free and a mutex-based policy for
std::shared_ptr reference counting based on this macro. Enabling this
option forces the lock-free policy, which avoids pulling in the
mutex-based implementation and can reduce code size.

Note: the lock-free policy avoids embedding a mutex in each control
block, saving about 88 bytes per shared_ptr, and improves performance
by using atomic operations instead of mutex locking.

Note: this option changes the ABI of libstdc++ atomic/shared_ptr
helpers. It can be incompatible when linking against prebuilt
libraries that were compiled without it, leading to link errors or
undefined runtime behavior. Only enable it if all C++ objects and
libraries in the build use the same setting.
2026-07-23 18:20:25 +07:00
morris
ee2cfdb3f3 Merge branch 'feature/isp-flash-dma-input' into 'master'
feat(isp): add aligned flash DMA input example

See merge request espressif/esp-idf!50959
2026-07-23 19:13:55 +08:00
Erhan Kurubas
6c6490d54c docs(esp_trace): restructure tracing docs with esp_trace as master
Reorganize the tracing documentation so esp_trace is the master
component, with app_trace, SystemView, and Gcov referenced from it.
2026-07-23 08:58:30 +03:00
Nebojša Cvetković
db6b310447 feat(tools): add -j/--jobs option to idf.py
Add a global -j/--jobs option to idf.py that sets the number of parallel
build jobs passed to the underlying build tool. Previously parallelism was
only configurable via the IDF_PY_BUILD_JOBS environment variable, and only
for the Ninja generator.

The option applies to both Ninja and Make and defaults to IDF_PY_BUILD_JOBS
when not given, so the environment variable keeps working as before.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 16:02:52 +01:00
Roland Dobai
480d5f2559 Merge branch 'chore/remove_old_root_managed_components_tests' into 'master'
chore: Remove old root managed components tests

See merge request espressif/esp-idf!51047
2026-07-22 10:36:58 +02:00
Ivan Grokhotkov
d3766ffdea Merge branch 'feature/build-file-command' into 'master'
feat: add idf.py build-file command for standalone C files

Closes IDF-15453

See merge request espressif/esp-idf!47618
2026-07-22 10:34:38 +02:00
Alexey Lapshin
631ad9033c 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-22 13:04:20 +07:00
Ivan Grokhotkov (bot)
b3a0e166fe feat: add compile_options support to idf.py build-file
Allow specifying extra compiler flags (warning flags, preprocessor
definitions, etc.) via a new 'compile_options' entry in the
idf-build-file frontmatter. The options are applied to the source
file via target_compile_options in the generated main component
CMakeLists, with CMake quoting so that flags like -DMSG="hello world"
reach the compiler exactly as written.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 22:04:41 +02:00
Ivan Grokhotkov
16275df0a1 feat: add idf.py build-file command for standalone C files
Add a new idf.py extension that allows building standalone C files
without requiring full project boilerplate. Source files can include
optional YAML frontmatter in block comments to specify sdkconfig
options, component dependencies, and target configuration.

When the frontmatter configuration changes, the stale sdkconfig is
removed so the new defaults are applied, and a target change also
clears the build directory since IDF_TARGET is pinned in the CMake
cache.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 22:04:41 +02:00
Daniel Paul
ee93f899c2 chore: Remove old root managed components tests 2026-07-21 16:01:27 +02:00
morris
26a22512eb refactor(hal): extract assist_debug, debug_probe and trace into esp_hal_debug_assist
Move the following modules from the hal component into a new dedicated
esp_hal_debug_assist component, following the esp_hal_timg pattern:

- assist_debug (hal + target-specific LL headers)
- debug_probe (types + target-specific LL headers)
- riscv_trace (hal + types + source + target-specific LL headers)
- trace_ll (esp32/esp32s2/esp32s3 target-specific LL headers)

Update the following components to depend on esp_hal_debug_assist:
esp_system, riscv, bootloader_support, esp_hw_support, esp_riscv_trace

Remove riscv_trace_hal.c from the hal component.
2026-07-21 11:28:11 +08:00
morris
0315e2fb2e feat(build): support aligned embedded binary data
Allow callers to align embedded binary start symbols for DMA-capable
assets.
2026-07-21 10:40:18 +08:00
Fu Hanxi
b260448d30 Merge branch 'ci/common-scripts' into 'master'
Ci/common scripts

Closes RDT-933

See merge request espressif/esp-idf!50564
2026-07-20 14:18:36 +02:00
Erhan Kurubas
7a07c33565 Merge branch 'feat/enable_function_tracing' into 'master'
Enable function tracing (-finstrument-functions)

See merge request espressif/esp-idf!49951
2026-07-16 15:57:42 +02:00
Renz Christian Bagaporo
faca8f56a3 Merge branch 'feat/cmakev2_ulp_full_subproject' into 'master'
feat(ulp): initial support for building ULP projects as full subprojects under CMake v2

See merge request espressif/esp-idf!50134
2026-07-16 21:00:32 +08:00
Alexey Lapshin
8a17c206c6 Merge branch 'feature/enable_unused-but-set-variable_errors' into 'master'
change: re-enable -Werror=unused-but-set-variable

See merge request espressif/esp-idf!50725
2026-07-16 15:31:20 +04:00
Marek Fiala
0fe0f5bd97 Merge branch 'feat/adapt_esp_pylib' into 'master'
feat(tools): adopt esp-pylib for idf.py logging and errors

Closes IDF-15312 and IDF-15320

See merge request espressif/esp-idf!49402
2026-07-16 17:33:41 +08:00
Erhan Kurubas
39d6aaaecb feat(esp_trace): add compiler-instrumented function tracing support 2026-07-16 10:18:25 +02:00
Alexey Lapshin
77d9f85b49 Merge branch 'feature/upgrade-esp-rom-elfs' into 'master'
feat(tools): tools: update esp-rom-elf to version 20260528

Closes IDFGH-17393

See merge request espressif/esp-idf!50772
2026-07-16 10:58:04 +04:00
Alexey Lapshin
1791325998 change(ci): enable -Werror=unused-but-set-variable 2026-07-16 10:54:36 +07:00
Marek Fiala
8974c24968 feat(tools): idf.py --port autocompletion 2026-07-15 20:19:07 +08:00