summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-12-02 20:32:37 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-12-02 20:33:15 +0100
commit57f3969ad2bdc9a3ad45424422b0394d4dd2748a (patch)
tree4d440c7709b99dc219409bf2367acf1e0fc2fa9d
parentada/sp07: Fix uninitialized variable (diff)
downloadrtems-57f3969ad2bdc9a3ad45424422b0394d4dd2748a.tar.bz2
bsps: Print internal error text
Update #3248.
-rw-r--r--c/src/lib/libbsp/shared/bspclean.c34
1 files 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..." );