From ce36ca50ab6ee71ae0b4a00b74892f42c9e10bba Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 11 Jan 2024 21:15:17 +0100 Subject: [PATCH] core/panic: fix build with !periph_pm --- core/lib/panic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/lib/panic.c b/core/lib/panic.c index ed9dae261f..6e6fb5a8cf 100644 --- a/core/lib/panic.c +++ b/core/lib/panic.c @@ -79,16 +79,18 @@ NORETURN void core_panic(core_panic_t crash_code, const char *message) /* disable watchdog and all possible sources of interrupts */ irq_disable(); panic_arch(); -#ifndef DEVELHELP +#if !defined(DEVELHELP) && defined(MODULE_PERIPH_PM) /* DEVELHELP not set => reboot system */ pm_reboot(); #else /* DEVELHELP set => power off system */ /* or start bootloader */ -#ifdef MODULE_USB_BOARD_RESET +#if defined(MODULE_USB_BOARD_RESET) usb_board_reset_in_bootloader(); -#else +#elif defined(MODULE_PERIPH_PM) pm_off(); +#else + while (1) {} #endif #endif /* DEVELHELP */