Commit Graph

1099 Commits

Author SHA1 Message Date
Sudeep Mohanty
052f444f32 change(test_apps): decouple netif_components from BUILD_COMPONENTS property
The BUILD_COMPONENTS build property only exists when building through the
Build system v1 compatibility shim. Query the executable library
interface's linked-components list instead, so the app does not depend on
compatibility-only properties.
2026-08-26 15:28:18 +02:00
Sudeep Mohanty
d519de14d1 change(test_apps): decouple g1_components from BUILD_COMPONENTS property
The BUILD_COMPONENTS build property only exists when building through the
Build system v1 compatibility shim. Query the executable library
interface's linked-components list instead, so the app does not depend on
compatibility-only properties.
2026-08-26 15:28:18 +02:00
Sudeep Mohanty
78d3f61757 change(test_apps): decouple g0_components from BUILD_COMPONENTS property
The BUILD_COMPONENTS build property only exists when building through the
Build system v1 compatibility shim. Query the executable library
interface's linked-components list instead, so the app does not depend on
compatibility-only properties.
2026-08-26 15:28:18 +02:00
Sudeep Mohanty
73bbe343ec fix(test_apps): drop obsolete esp_common dependency violations 2026-08-26 15:28:18 +02:00
Fu Hanxi
289a17b3a2 tests: replace CLI-dependent xfail/skipif conditions 2026-08-20 09:14:41 +02:00
harshal.patil
01b86f1269 change(esp_hw_support): harden the ESP32-S31 PSRAM region permissions
Both PSRAM layouts were mapped as a single RWX window, so everything in external
RAM - the heap included - was executable.

PSRAM used as data only is now RW, and under XIP-from-PSRAM it is split per
section as ESP32-P4 does: .text RX, .rodata read-only, and the MMU-page
alignment gaps and the reclaimed heap RW, so neither is executable.

Both describe the layout that esp_psram_init() produces, and the entries are
locked, so - again as on ESP32-P4 - they are only narrowed when
CONFIG_SPIRAM_PRE_CONFIGURE_MEMORY_PROTECTION says that layout applies. Without
it the application owns the region and PSRAM stays RWX.

The per-section entries cost one PMP entry more than the 16 available, so the CPU
subsystem and peripheral windows are chained as TOR entries, taking one entry
instead of three.

soc.h is corrected against the S31 bus address map: the peripheral window base
was 1 MB too low, and the LP peripheral top, derived from a register base plus a
size rather than from the map, was 16 KB short. SOC_NON_CACHEABLE_OFFSET_FLASH
is added.
2026-08-19 09:39:52 +05:30
nilesh.kale
b5891edb9b feat: enable cpu region protection for esp32s31 2026-08-17 19:23:58 +05:30
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
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
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
Marius Vikhammer
dd089bacb2 ci(size_metrics): add more size metrics apps 2026-08-07 13:49:28 +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
Sudeep Mohanty
cc799dbcc7 test(kasan): re-enable kasan_test under build system v2 2026-08-03 17:29:00 +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
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
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
a91a316449 ci(ulp): re-enable legacy ULP buildv2 jobs 2026-07-29 13:08:22 +09: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
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
Renz Bagaporo
5b67ff37cd ci(ulp): temporarily disable legacy ULP apps for buildv2
Keep legacy ULP apps on the CMake v1 build path while buildv2 coverage
is limited to full_subproject ULP apps.

Also add the missing esp_driver_gpio dependency to the esp_pm test app
so buildv2 dependency checks see driver/rtc_io.h explicitly.
2026-07-15 10:17:52 +09:00
Frantisek Hrbata
a9ea4f1105 refactor(ulp): provide a ulp_project.cmake subproject wrapper API
Build ULP full subprojects through a dedicated entry file,
components/ulp/cmake/ulp_project.cmake, that wraps tools/cmakev2/idf.cmake
and layers a small ULP API on top, mirroring the cmakev2 layering:

  ulp_project_init      like idf_project_init (init, detect the ULP type,
                        reset the compile/link options inherited from the app)
  ulp_build_executable  like idf_build_executable, plus the embeddable
                        .bin/.h/.ld artifacts
  ulp_project_default   like idf_project_default (single-executable case)

A child project now includes this one file instead of idf.cmake and calls
these helpers directly, so idf_build_executable is used as-is for the
multi-binary case and the module-path indirection (include(IDFULPProject)
resolved via -DCMAKE_MODULE_PATH) is gone.

As a result:
- IDFULPProjectv2.cmake is removed; its setup moves into the wrapper.
- IDFULPProject.cmake becomes the CMake v1-only entry point.
- The ULP component no longer registers a POST_ELF callback; the binary
  artifacts are produced by ulp_build_executable.
- The v2 full-subproject examples (lp_core, riscv, fsm, multi_binary,
  combined) are updated to the new API.
- The ULP subproject API is documented in build-system-v2.rst.

Also fix a latent bug this exercises: idf_build_library emitted linker
scripts as "-T <name>" relying on a following "-L" search directory. GNU
ld only searches -L directories that precede -T, so the direct
esp32ulp-elf-ld link used for ULP FSM failed to open the script. Emit the
absolute path instead, matching what the CMake v1 ULP build already does.

Finally, replace the parent-argument bypass loop that used to live in
IDFULPProjectv2.cmake with --no-warn-unused-cli on the child configure,
and stop passing the unused IDF_PARENT_BUILD_DIR.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-07-15 09:34:05 +09:00
Renz Bagaporo
a78b61cf19 feat(examples): add full-subproject ULP examples 2026-07-15 09:14:35 +09:00
Ivan Grokhotkov (bot)
5e192672a2 ci(system): add startup test config with LTO enabled
Add an opt_os_lto configuration to the startup test app that enables size
optimization together with link-time and compile-time LTO, and run it across
the supported targets so the LTO build is exercised on real hardware in CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 19:32:19 +02:00
Erhan Kurubas
cdb91d03d5 test(coredump): re-enable extram stack test for esp32p4-rev3 2026-07-14 11:47:14 +02:00
Erhan Kurubas
f561c9d3cf test(coredump): fix psram memory range for esp32s31 and esp32p4 2026-07-14 11:46:34 +02:00
Erhan Kurubas
4eb0163fb9 Merge branch 'enable_esp32s31_jtag_tests' into 'master'
change(ci): enable esp32s31 jtag tests

Closes IDF-14691, IDF-14692, IDF-14942, and IDFCI-11113

See merge request espressif/esp-idf!50149
2026-07-14 11:39:22 +02:00
Chen Chen
5456956d14 Merge branch 'contrib/github_pr_18832' into 'master'
fix(mocks): add missing `esp_hal_*` includes (GitHub PR)

Closes IDFGH-17968

See merge request espressif/esp-idf!50720
2026-07-14 17:29:12 +08:00
Chen Chen
221f1725c9 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 16:03:22 +08:00
Erhan Kurubas
8ea2d7be4d ci(coredump): enable esp32h4 tests 2026-07-08 23:54:08 +02:00
Erhan Kurubas
4cf35efa35 test(usb_serial_jtag): pin console uart to ttyUSBx port 2026-07-08 12:59:44 +02:00
Marius Vikhammer
ff88ad88a9 Merge branch 'test/linux-full-component-build' into 'master'
test: add Linux full component build app

See merge request espressif/esp-idf!50377
2026-07-08 10:13:12 +08:00
morris
651d6a283f refactor(esp_common): centralize ALIGN_UP/ALIGN_DOWN into esp_macros.h
Remove ~50 duplicate local definitions of ALIGN_UP/ALIGN_DOWN/ALIGN_UP_BY/
ALIGN_DOWN_BY across the codebase and replace them with canonical
ESP_ALIGN_UP/ESP_ALIGN_DOWN from esp_macros.h.
2026-07-06 13:36:06 +08:00
Marius Vikhammer
bd25b59620 test: add Linux full component build app
Exercise unrestricted Linux-target builds so unsupported hardware-only components are caught by CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 13:26:17 +08:00
Aditya Patwardhan
2468defbff Merge branch 'feat/update_documentation_and_cleanup_for_s31' into 'master'
enable tests and cleanup JIRA references for s31

Closes IDF-14629 and IDF-14628

See merge request espressif/esp-idf!49273
2026-07-06 10:31:47 +05:30
Erhan Kurubas
0586fb67c2 Merge branch 'coredump_test_fixes' into 'master'
Coredump fixes

Closes IDF-15881 and IDF-13849

See merge request espressif/esp-idf!48439
2026-07-03 16:38:00 +02:00
nilesh.kale
9144db695a feat: enable tests and cleanup jira references for s31 2026-07-03 15:31:51 +05:30
Erhan Kurubas
815a38b7f4 test(espcoredump): run test_tcb_corrupted with custom stack 2026-07-02 23:09:05 +02:00
Sudeep Mohanty
6ab1fe654d test(kasan): disable kasan_test under build system v2 2026-07-01 13:17:25 +02:00
Sudeep Mohanty
b3951f4013 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-01 13:17:25 +02:00
harshal.patil
64e694541b 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-06-29 13:00:54 +05:30
Michael (XIAO Xufeng)
c1b218b640 Merge branch 'fix/mmap_cache_flash_wr' into 'master'
fix(mmap): fixed mmap read data wrong when flash being erased/written and cache not disabled

Closes IDFGH-14084

See merge request espressif/esp-idf!29804
2026-06-29 11:44:10 +08:00
Meet Patel
d51e467e7c Merge branch 'feature/add_kasan_support' into 'master'
feat(kasan): add Kernel Address Sanitizer (KASAN) support for ESP-IDF

Closes IDF-13467

See merge request espressif/esp-idf!48106
2026-06-25 11:30:48 +05:30