Skip to content

Commit caa8079

Browse files
sylvioalvesMaureenHelm
authored andcommitted
tests: debug: coredump: use k_panic() for Espressif SoCs
Espressif RISC-V chips (ESP32-C3, ESP32-C6, etc.) with PMP enabled use dynamic PMP mode (CONFIG_PMP_NO_LOCK_GLOBAL). In this mode, null pointer dereference to address 0 causes a bus hang instead of generating a clean exception, since address 0 is outside any valid memory region and there's no PMP entry protecting it. Use k_panic() instead, which reliably triggers the coredump path on all Espressif chips. Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
1 parent 59206e4 commit caa8079

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • tests/subsys/debug/coredump/src

tests/subsys/debug/coredump/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ __no_optimization void func_3(uint32_t *addr)
4343
defined(CONFIG_BOARD_RISCV32_VIRTUAL) || \
4444
defined(CONFIG_SOC_FAMILY_INTEL_ISH) || \
4545
defined(CONFIG_SOC_FAMILY_INTEL_ADSP) || \
46+
defined(CONFIG_SOC_FAMILY_ESPRESSIF_ESP32) || \
4647
defined(CONFIG_SOC_FAMILY_OPENHWGROUP_CVA6)
4748
/* clang-format on */
4849
ARG_UNUSED(addr);

0 commit comments

Comments
 (0)