Commit Graph

179 Commits

Author SHA1 Message Date
Erhan Kurubas
8ea2d7be4d ci(coredump): enable esp32h4 tests 2026-07-08 23:54:08 +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
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
Erhan Kurubas
815a38b7f4 test(espcoredump): run test_tcb_corrupted with custom stack 2026-07-02 23:09:05 +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
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
6377ac3ec2 test(panic): refactor panic test to split out coredump 2026-05-15 11:00:44 +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
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
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
Marius Vikhammer
c216628442 test(system): enable panic tests for P4 and S31 2026-04-10 08:35:25 +08:00
C.S.M
152b5ccb4c ci(esp32s31): Add ci target test for esp32s31 2026-04-03 11:38:45 +08: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
Erhan Kurubas
5ba3e9df98 feat(coredump): add coredump_extram attribute
Closes https://github.com/espressif/esp-idf/issues/15429
2026-02-02 10:25:03 +01:00
Aditya Patwardhan
eb4a871eca refactor(esp_hal_security): Updated esp_hal_security build and includes 2026-01-21 10:02:44 +05:30
Erhan Kurubas
caa0697240 test(panic): add retry logic to espcoredump subprocess call 2026-01-20 10:32:18 +03:00
Erhan Kurubas
14c16bee61 feat(coredump): add coredump_noinit attribute 2026-01-11 18:57:37 +03:00
Erhan Kurubas
82643a03c8 test(espcoredump): fix test for corrupted TCB handling in coredump 2026-01-05 22:16:43 +03:00
Erhan Kurubas
85e7ef753d test(panic): improve stack dump capture to return full hex content 2026-01-05 22:11:23 +03:00
Ashish Sharma
345844cd58 feat: migrates tools/test_apps to PSA APIs 2025-12-30 09:31:49 +05:30
Igor Udot
84d2b57df9 Merge branch 'ci/check_build_test_rules' into 'master'
ci: fix mismatch in check_build_test_rules

Closes CII-49 and CII-50

See merge request espressif/esp-idf!43937
2025-12-05 11:56:39 +08:00
igor.udot
8c233aa9bd ci: temp_skip_ci for p4 2025-12-04 18:08:33 +08:00
Alexey Lapshin
31810ae993 feat(esp_libc): make picolibc default libc 2025-12-03 13:31:42 +07:00
Erhan Kurubas
083999290e fix(espcoredump): prevent double exception during int_wdt panic with custom stack 2025-11-20 11:14:42 +01:00
armando
b25ba4a0c1 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-17 12:11:39 +08:00
harshal.patil
c66ef46f99 feat(cpu_region_protect): Extend PMP memprot for ESP32-P4 V3 2025-11-05 13:34:47 +05:30
Erhan Kurubas
0d97c63885 change(coredump): make conditional build in cmake based on config options 2025-09-10 05:23:20 +08:00
Marek Fiala
9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
Sudeep Mohanty
11b80a7f11 Merge branch 'feat/freertos_in_flash_by_default' into 'master'
feat(freertos): Place FreeRTOS in flash by default

Closes IDF-12695

See merge request espressif/esp-idf!40579
2025-08-15 02:18:57 +02:00
Sudeep Mohanty
f1ab53eda0 test(panic_handler): Added unit test to verify panic handler can halt
This test verifies that the panic handler can indeed halt when
configured to print and halt instead of rebboting.
2025-08-13 15:40:07 +02:00
Erhan Kurubas
51f8f625ec fix(coredump): rename uart test config file 2025-08-07 17:13:44 +03:00
Sudeep Mohanty
26c19928a9 feat(freertos): Place FreeRTOS in flash by default
The following updates have been made in this commit:
- The commit places FreeRTOS code in flash memory by default.
- CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH has been removed.
- CONFIG_FREERTOS_IN_IRAM is unhidden and can be used to restore the
  previous memory placement.
- A test has been added for users to conduct performance impact testing
  based on memory placement configurations.
2025-08-07 19:56:30 +08:00
harshal.patil
60ff4bca9b refactor(esp_system): Update all references of the memory protection configs 2025-08-04 11:43:01 +05:30
Erhan Kurubas
fb53d6e719 change(coredump): drop binary format and crc checksum 2025-07-29 22:31:40 +03:00
Fu Hanxi
288fc561b7 tests: fix skipif markers. use temp_skip instead 2025-07-16 09:12:03 +02:00
nilesh.kale
d4167fea60 feat(esp_hw_support): Enabled support for memory region protection for H21
This commit enabled CPU region protection for ESP32H21.
This alos updated strture for ESP32C6 and ESP32H2.
2025-07-08 13:45:01 +08:00
Alexey Lapshin
2279047883 fix(panic): fix reset checking in panic tests 2025-06-25 18:01:50 +07:00
Alexey Lapshin
8384f4dffd fix(panic_test): avoid linker check on dangerous relocations
xtensa linker throws warning
dangerous relocation: windowed longcall crosses 1GB boundary; return may fail

create separate function to call function by pointer to avoid warnings
2025-06-25 18:01:50 +07:00
harshal.patil
ab229a34b3 feat(cpu_region_protect): Enable basic memory protection for SPIRAM 2025-04-29 11:48:27 +05:30
Chen Jichang
c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
Erhan Kurubas
d2c882502d test(coredump): add test to dump dram from uart 2025-03-26 10:00:24 +01:00
Erhan Kurubas
11e6aa8f1a test(panic): refactor test parameters with itertools 2025-03-05 14:01:25 +01:00
igor.udot
daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
Marius Vikhammer
a5fe1e2a46 Merge branch 'feature/h21_panic' into 'master'
feat(esph21): bringup and test panic handler

Closes IDF-11546

See merge request espressif/esp-idf!37007
2025-02-21 10:25:03 +08:00
Sudeep Mohanty
b562afa08e fix(panic_handler): Updated panic handler to use RTC WDT
This commit updates the following:
- Updates the panic handler to use only the RTC WDT to reset the system.
- Refactors some of the panic handler code.
- Updates Bluetooth files where in they now feed the WDTs instead of
  reconfiguring them.
- Removes some unnecessary configuration of WDTs from various files.
- Added a unit test to verify that the system does not lock up when the
  panic handler is stuck.
- Updates the memprot unit tests to work with the refactored panic
  handler.

Closes https://github.com/espressif/esp-idf/issues/15166
Closes https://github.com/espressif/esp-idf/issues/15018
Closes https://github.com/espressif/esp-idf/issues/10110
2025-02-18 15:40:54 +01:00