From 3237ed911e5c4d03191e89e7a2258b402d333dd0 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 17 Jul 2024 16:18:19 +0200 Subject: [PATCH] core/panic: don't use LOG_ functions in panic handler --- core/lib/panic.c | 10 +++++----- cpu/cortexm_common/panic.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/lib/panic.c b/core/lib/panic.c index 1b056a84eaf9..9dcdd5993c2a 100644 --- a/core/lib/panic.c +++ b/core/lib/panic.c @@ -21,12 +21,12 @@ * @author Kaspar Schleiser */ +#include #include "kernel_defines.h" #include "cpu.h" #include "irq.h" #include "panic.h" #include "periph/pm.h" -#include "log.h" #if defined(DEVELHELP) && defined(MODULE_PS) #include "ps.h" @@ -64,16 +64,16 @@ NORETURN void core_panic(core_panic_t crash_code, const char *message) /* Call back app in case it wants to store some context */ panic_app(crash_code, message); - LOG_ERROR("*** RIOT kernel panic:\n%s\n\n", message); + printf("*** RIOT kernel panic:\n%s\n\n", message); #ifdef DEVELHELP #ifdef MODULE_PS ps(); - LOG_ERROR("\n"); + printf("\n"); #endif - LOG_ERROR("*** halted.\n\n"); + printf("*** halted.\n\n"); #else - LOG_ERROR("*** rebooting...\n\n"); + printf("*** rebooting...\n\n"); #endif } /* disable watchdog and all possible sources of interrupts */ diff --git a/cpu/cortexm_common/panic.c b/cpu/cortexm_common/panic.c index 5cef36cd50f2..8aa7d8866fc9 100644 --- a/cpu/cortexm_common/panic.c +++ b/cpu/cortexm_common/panic.c @@ -20,8 +20,8 @@ * @author Toon Stegen */ +#include #include "cpu.h" -#include "log.h" #ifdef DEVELHELP static void print_ipsr(void) @@ -31,7 +31,7 @@ static void print_ipsr(void) if (ipsr) { /* if you get here, you might have forgotten to implement the isr * for the printed interrupt number */ - LOG_ERROR("Inside isr %d\n", ((int)ipsr) - 16); + printf("Inside isr %d\n", ((int)ipsr) - 16); } } #endif