mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #20790 from benpicco/log_panic
core/panic: don't use LOG_ functions in panic handler
This commit is contained in:
commit
388a7d4056
@ -21,12 +21,12 @@
|
||||
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#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 */
|
||||
|
@ -20,8 +20,8 @@
|
||||
* @author Toon Stegen <toon.stegen@altran.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user