From 57f3969ad2bdc9a3ad45424422b0394d4dd2748a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Sat, 2 Dec 2017 20:32:37 +0100 Subject: bsps: Print internal error text Update #3248. --- c/src/lib/libbsp/shared/bspclean.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/c/src/lib/libbsp/shared/bspclean.c b/c/src/lib/libbsp/shared/bspclean.c index bae9d21889..e5fee78961 100644 --- a/c/src/lib/libbsp/shared/bspclean.c +++ b/c/src/lib/libbsp/shared/bspclean.c @@ -22,16 +22,9 @@ void bsp_fatal_extension( printk( "\n" "*** FATAL ***\n" - "fatal source: %i (%s)\n" - "fatal code: %ju (0x%08jx)\n" - "RTEMS version: %s\n" - "RTEMS tools: %s\n", + "fatal source: %i (%s)\n", source, - rtems_fatal_source_text( source ), - (uintmax_t) code, - (uintmax_t) code, - rtems_version(), - __VERSION__ + rtems_fatal_source_text( source ) ); #endif @@ -41,6 +34,29 @@ void bsp_fatal_extension( } #endif + #if BSP_VERBOSE_FATAL_EXTENSION + else if ( source == INTERNAL_ERROR_CORE ) { + printk( + "fatal code: %ju (%s)\n", + (uintmax_t) code, + rtems_internal_error_text( code ) + ); + } else { + printk( + "fatal code: %ju (0x%08jx)\n", + (uintmax_t) code, + (uintmax_t) code + ); + } + + printk( + "RTEMS version: %s\n" + "RTEMS tools: %s\n", + rtems_version(), + __VERSION__ + ); + #endif + #if (BSP_PRESS_KEY_FOR_RESET) printk( "\nFATAL ERROR - Executive shutdown! Any key to reboot..." ); -- cgit v1.2.3