summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-05-06 17:44:22 +1000
committerChris Johns <chrisj@rtems.org>2016-05-11 11:45:01 +1000
commitb61f58fc2c322db40be570473a2dc345de3341ae (patch)
tree985f52c15337cf1f1b7dec2646c2c33b892ecf1d /c
parentbsp/shared: Add bsp_interrupt_handler_is_empty. (diff)
downloadrtems-b61f58fc2c322db40be570473a2dc345de3341ae.tar.bz2
bsp/shared: Print the exception stack frame before the shut down message.
This lets you see the exception otherwise the key press clears the screen on the reboot on a PC BSP. Also state there has been a fatal error.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/shared/bspclean.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/shared/bspclean.c b/c/src/lib/libbsp/shared/bspclean.c
index 2262c9d88b..4265f11fa4 100644
--- a/c/src/lib/libbsp/shared/bspclean.c
+++ b/c/src/lib/libbsp/shared/bspclean.c
@@ -17,8 +17,14 @@ void bsp_fatal_extension(
rtems_fatal_code code
)
{
+ #if (BSP_PRINT_EXCEPTION_CONTEXT)
+ if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) {
+ rtems_exception_frame_print( (const rtems_exception_frame *) code );
+ }
+ #endif
+
#if (BSP_PRESS_KEY_FOR_RESET)
- printk( "\nEXECUTIVE SHUTDOWN! Any key to reboot..." );
+ printk( "\nFATAL ERROR - Executive shutdown! Any key to reboot..." );
/*
* Wait for a key to be pressed
@@ -29,12 +35,6 @@ void bsp_fatal_extension(
printk("\n");
#endif
- #if (BSP_PRINT_EXCEPTION_CONTEXT)
- if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) {
- rtems_exception_frame_print( (const rtems_exception_frame *) code );
- }
- #endif
-
/*
* Check both conditions -- if you want to ask for reboot, then
* you must have meant to reset the board.