diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-21 13:30:26 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-22 09:40:24 +0100 |
commit | 86a80ee1af0fedb3b575ae95db7e80f80d46b533 (patch) | |
tree | 199b27f845b337aabff042c1158bdc3834840d83 /c/src/lib/libbsp/shared | |
parent | bsps: Simplify RTEMS_BSP_CLEANUP_OPTIONS (diff) | |
download | rtems-86a80ee1af0fedb3b575ae95db7e80f80d46b533.tar.bz2 |
bsps: Add BSP_VERBOSE_FATAL_EXTENSION
Add BSP_VERBOSE_FATAL_EXTENSION to RTEMS_BSP_CLEANUP_OPTIONS to
optionally print the RTEMS version, the fatal source and the fatal code
in the shared bsp_fatal_extension().
Close #3248.
Diffstat (limited to 'c/src/lib/libbsp/shared')
-rw-r--r-- | c/src/lib/libbsp/shared/bspclean.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/shared/bspclean.c b/c/src/lib/libbsp/shared/bspclean.c index e045512da0..bae9d21889 100644 --- a/c/src/lib/libbsp/shared/bspclean.c +++ b/c/src/lib/libbsp/shared/bspclean.c @@ -10,6 +10,7 @@ #include <bsp.h> #include <bsp/bootcard.h> #include <rtems/bspIo.h> +#include <rtems/version.h> void bsp_fatal_extension( rtems_fatal_source source, @@ -17,7 +18,24 @@ void bsp_fatal_extension( rtems_fatal_code code ) { - #if (BSP_PRINT_EXCEPTION_CONTEXT) + #if BSP_VERBOSE_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", + source, + rtems_fatal_source_text( source ), + (uintmax_t) code, + (uintmax_t) code, + rtems_version(), + __VERSION__ + ); + #endif + + #if (BSP_PRINT_EXCEPTION_CONTEXT) || BSP_VERBOSE_FATAL_EXTENSION if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) { rtems_exception_frame_print( (const rtems_exception_frame *) code ); } |