[rtems commit] bsps: Print internal error text

Sebastian Huber sebh at rtems.org
Sat Dec 2 19:33:47 UTC 2017


Module:    rtems
Branch:    master
Commit:    57f3969ad2bdc9a3ad45424422b0394d4dd2748a
Changeset: http://git.rtems.org/rtems/commit/?id=57f3969ad2bdc9a3ad45424422b0394d4dd2748a

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Sat Dec  2 20:32:37 2017 +0100

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 bae9d21..e5fee78 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..." );
 




More information about the vc mailing list