-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20790 from benpicco/log_panic
core/panic: don't use LOG_ functions in panic handler
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,12 +21,12 @@ | |
* @author Kaspar Schleiser <[email protected]> | ||
*/ | ||
|
||
#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 */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ | |
* @author Toon Stegen <[email protected]> | ||
*/ | ||
|
||
#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 | ||
|