1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #3888 from kaspar030/make_core_printf_optional

core: make core dependency on *printf optional
This commit is contained in:
Cenk Gündoğan 2016-03-11 08:28:48 +01:00
commit 6f4806a3e4

View File

@ -32,6 +32,7 @@
#include "panic.h"
#include "arch/panic_arch.h"
#include "reboot.h"
#include "log.h"
#if defined(DEVELHELP) && defined(MODULE_PS)
#include "ps.h"
@ -55,18 +56,16 @@ NORETURN void core_panic(core_panic_t crash_code, const char *message)
cpu_print_last_instruction();
}
#endif
puts("*** RIOT kernel panic:");
puts(message);
puts("");
LOG_ERROR("*** RIOT kernel panic:\n%s\n\n", message);
#ifdef DEVELHELP
#ifdef MODULE_PS
ps();
puts("");
LOG_ERROR("\n");
#endif
puts("*** halted.\n");
LOG_ERROR("*** halted.\n\n");
#else
puts("*** rebooting...\n\n");
LOG_ERROR("*** rebooting...\n\n");
#endif
}
/* disable watchdog and all possible sources of interrupts */