Commit Graph

669 Commits

Author SHA1 Message Date
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
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
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
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
383e9adb82 feat(kasan): add Kernel Address Sanitizer (KASAN) support for ESP-IDF
Add KASAN support for detecting heap memory safety bugs (buffer
overflows, underflows, use-after-free) at runtime using compiler
instrumentation and shadow memory. Gated behind
CONFIG_IDF_EXPERIMENTAL_FEATURES, with touch points kept to esp_system
and heap so other components stay untouched.

- Core runtime (esp_system/kasan.c, esp_kasan.h): nibble-based shadow
  memory in DRAM, poison/unpoison, per-access validation, and __asan_*
  stubs; hot-path stubs in IRAM so they stay valid with the flash cache
  off. Shadow init runs before heap bring-up.
- Heap integration (heap/heap_kasan*.c): alloc/free hooks add redzones,
  a quarantine FIFO, and shadow updates.
- Panic handling: disable checks once at the panic handler entry so
  backtrace and stack dumps can read redzones without nested reports.
- Build system: -fsanitize=kernel-address for app code, with HAL, SoC,
  esp_rom, SPI flash, esp_hw_support, bootloader_support, FreeRTOS, and
  heap internals excluded from instrumentation.
- Test app (tools/test_apps/system/kasan_test): Unity tests for
  overflow, underflow, use-after-free, and all sized __asan_* stubs,
  with halt and no-halt configurations.
- Docs: document KASAN in the heap memory debugging guide (EN and CN).
2026-06-24 11:27:00 +05:30
Xiao Xufeng
789ce684c9 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-06-16 01:00:43 +08:00
Marius Vikhammer
d21dc8ca2e feat(freertos): added option for automatically placing task stacks in PSRAM
When CONFIG_FREERTOS_PLACE_TASK_STACKS_IN_EXT_RAM is enabled freertos will
now automatically allocate task stacks to PSRAM.
2026-06-04 16:06:52 +08:00
Sudeep Mohanty
301eeba878 Merge branch 'task/buildv2_hygiene_and_dep_declarations' into 'master'
fix(components): generic dep-declaration and scope-leakage hygiene exposed by cmakev2

See merge request espressif/esp-idf!48739
2026-05-26 10:18:22 +02:00
Renz Bagaporo
f6bf9206cc test(ci): re-enable skipped ESP32-H4 unicore bootloader tests 2026-05-22 11:10:28 +09:00
Sudeep Mohanty
6084733b91 fix(test_apps/g0_components): skip -D injection when Kconfig is processed
The CMakeLists injects CONFIG_ESP_REV_MIN_FULL and CONFIG_XTAL_FREQ on
the command line because those symbols live in esp_common's Kconfig,
which is outside the G0 closure and is not loaded during a restricted
COMPONENTS build. When every discovered component's Kconfig is processed
(IDF_BUILD_V2) the symbols are already defined via their Kconfig
defaults, and the additional -D would conflict with the existing
definition.

Gate the injection so it only runs when the Kconfig is not processed.
2026-05-21 13:58:27 +02:00
Sudeep Mohanty
6c3d8f8de5 fix(g1_components): force VFS_SUPPORT_IO=n for restricted COMPONENTS build
g1_components builds a minimal COMPONENTS list. When every component's
Kconfig is processed, components/vfs/Kconfig sets VFS_SUPPORT_IO=y by
default, and the conditional requires in esp_stdio and esp_libc pull
vfs, esp_driver_uart, and their transitive deps into the closure.

Add an sdkconfig.defaults that forces the symbol off so the dependency
graph stays restricted to the components actually under test.
2026-05-21 13:58:27 +02:00
Sudeep Mohanty
fb7d325b72 test(g1_components): record dep edges surfaced by DEFERRED optional requires
expected_dep_violations only listed the edges visible when
idf_component_optional_requires was a no-op for the dependency graph.
Under build system v2's DEFERRED mode the call propagates the resolved
dependency back into PRIV_REQUIRES, and the graph also captures
esp_common -> {efuse, bootloader_support, app_update} and esp_system ->
esp_app_format.

Add those entries so the script does not flag them when IDF_BUILD_V2
is set.
2026-05-21 13:58:22 +02:00
Sudeep Mohanty
77b7625b81 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-05-21 10:05:48 +02:00
Sudeep Mohanty
bdcd2d611c 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-05-21 10:05:48 +02:00
Marius Vikhammer
6377ac3ec2 test(panic): refactor panic test to split out coredump 2026-05-15 11:00:44 +08:00
Marius Vikhammer
1a65724653 Merge branch 'ci/h4_core_sys_test' into 'master'
test(ci): re-enable ESP32-H4 in core system test apps

Closes IDF-15602, IDF-15604, IDF-15605, IDF-15606, and IDF-15612

See merge request espressif/esp-idf!48454
2026-05-13 14:24:16 +08:00
Marius Vikhammer
8f6ea2a1ba test(ci): re-enable ESP32-H4 in core system test apps
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-13 09:00:12 +08:00
Konstantin Kondrashov
485ab9aa29 Merge branch 'feature/recovery_bootloader_support' into 'master'
feat(bootloader): Support recovery bootloader for ESP32P4

Closes IDF-15653 and IDF-13165

See merge request espressif/esp-idf!48215
2026-05-12 23:24:40 +03:00
Marius Vikhammer
96333567e8 ci(system): fixing misc core system H4 tests 2026-05-12 17:12:30 +08:00
C.S.M
036fcf8e37 Merge branch 'feat/bod_bringup_s31' into 'master'
feat(bod): Add bod support on esp32s31

Closes IDF-14658

See merge request espressif/esp-idf!48310
2026-05-12 15:29:19 +08:00
C.S.M
2b7992213c feat(bod): Add bod support on esp32s31 2026-05-12 12:30:35 +08:00
Chen Jichang
3c3b9a6a4e ci(esp32h4): disable tests which cannot pass 2026-05-11 16:48:58 +08:00
Chen Jichang
645ff40cde ci(esp32h4): enable ci target test 2026-05-11 16:48:58 +08:00
Konstantin Kondrashov
dd9a0a9a93 fix(test_apps): Increase CONFIG_PARTITION_TABLE_OFFSET to 0x9000
Fix some test apps that have a partition table offset of 0x8000,
which left no room for the bootloader for some chips.
2026-05-08 16:45:14 +03:00
Marius Vikhammer
c06bf7de44 ci(build): removed and replaced template with regular test-apps 2026-04-29 15:21:30 +08:00
Marius Vikhammer
4d18240744 fix(esp_intr_dump): sync esp32s31 expected output
Keep the esp32s31 fixture aligned with the assist_debug reservation on interrupt 27.
2026-04-16 11:35:43 +08:00
Alexey Gerenkov
8c4897f62e Merge branch 'fix/coredump_fake_stack_range' into 'master'
fix(coredump): fix fake stack address range overlapping esp32s31 DRAM

Closes IDFCI-10393, IDFCI-10395, IDFCI-10396, IDFCI-10405, IDFCI-10402, IDFCI-10401, IDFCI-10403, IDFCI-10389, IDFCI-10406, IDFCI-10390, IDFCI-10391, IDF-14673, and IDF-14675

See merge request espressif/esp-idf!47480
2026-04-13 23:13:26 +08:00
nilesh.kale
a6a2696972 fix(cpu_region_protect): set DROM mask PMP entry to read-only
PMP entry 3 (SOC_DROM_MASK_HIGH, TOR mode) in the memprot path
was incorrectly granted RW permission on esp32h21 and esp32c61.
The mask ROM data region is inherently read-only; remove the W bit.

Also added necessary tests to check voilations and re-enabled
tests for ESP32P4
2026-04-13 10:27:58 +05:30
Erhan Kurubas
54287a574b test(panic): update multi-core target list in panic_dut 2026-04-10 19:58:56 +02:00
Erhan Kurubas
85a717f0a3 Merge branch 'esp32s31-assist-debug' into 'master'
feat(esp32s31): add assist_debug stack monitoring support

See merge request espressif/esp-idf!47282
2026-04-10 19:58:21 +02:00
Marius Vikhammer
c1e5a95755 Merge branch 'ci/panic_tests_p4_s31' into 'master'
test(system): enable panic tests for P4 and S31

Closes IDF-14348

See merge request espressif/esp-idf!47442
2026-04-10 15:03:39 +08:00
Marius Vikhammer
c216628442 test(system): enable panic tests for P4 and S31 2026-04-10 08:35:25 +08:00
Erhan Kurubas
f6ae009f40 feat(esp32s31): add assist_debug stack monitoring support 2026-04-09 21:20:51 +08:00
Alexey Lapshin
08b423a06b feat(soc): ESP32-S31: enable SOC_ASYNCHRONOUS_BUS_ERROR_MODE
- Enable SOC_ASYNCHRONOUS_BUS_ERROR_MODE to correct MEPC value when debugging.
- Enable gdbstub test_hwloop_jump and test_coproc_registers
2026-04-09 10:39:17 +08:00
Marius Vikhammer
82c1f71d96 ci(esp_intr_dump): add expected output for esp32s31 2026-04-08 09:43:21 +08:00
C.S.M
152b5ccb4c ci(esp32s31): Add ci target test for esp32s31 2026-04-03 11:38:45 +08:00
Fu Hanxi
e93cda6391 Merge branch 'ci/apply-idf-ci-1.x' into 'master'
ci: upgrade idf-ci to 1.x

Closes CII-108

See merge request espressif/esp-idf!46623
2026-03-30 19:31:53 +02:00
Fu Hanxi
9ecd3ecad4 ci: apply idf-ci 1.x 2026-03-27 15:12:31 +01:00
Fu Hanxi
ddc7e0cdf7 ci: move qemu test cli args alongside test scripts
remove redundant host_test marker
2026-03-26 10:56:15 +01:00
Marius Vikhammer
25a2747dfd ci: restore runnable pytest configs
Use real CI config names and minimal config aliases so these tests are
collected and built again instead of silently being skipped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Made-with: Cursor
2026-03-16 13:45:26 +08:00
Evgeny Torbin
d0f062c018 ci: remove unused test cases 2026-03-12 12:02:10 +01:00
Song Ruo Jing
600bf5b6d7 refactor(esp_hal_regi2c): move regi2c implementation from esp_rom to esp_hal_regi2c 2026-03-10 15:08:51 +08:00