5
Last change
on this file since 86a80ee1 was
86a80ee1,
checked in by Sebastian Huber <sebastian.huber@…>, on 11/21/17 at 12:30:26
|
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.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[e2a2ec60] | 1 | /* |
---|
[08311cc3] | 2 | * COPYRIGHT (c) 1989-1999. |
---|
[e2a2ec60] | 3 | * On-Line Applications Research Corporation (OAR). |
---|
| 4 | * |
---|
| 5 | * The license and distribution terms for this file may be |
---|
| 6 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 7 | * http://www.rtems.org/license/LICENSE. |
---|
[e2a2ec60] | 8 | */ |
---|
| 9 | |
---|
[54cf1198] | 10 | #include <bsp.h> |
---|
| 11 | #include <bsp/bootcard.h> |
---|
[3a1d9c6] | 12 | #include <rtems/bspIo.h> |
---|
[86a80ee1] | 13 | #include <rtems/version.h> |
---|
[54cf1198] | 14 | |
---|
[a052181] | 15 | void bsp_fatal_extension( |
---|
| 16 | rtems_fatal_source source, |
---|
[6a9282d] | 17 | bool always_set_to_false, |
---|
[815994f] | 18 | rtems_fatal_code code |
---|
[1e1ee0c] | 19 | ) |
---|
[e2a2ec60] | 20 | { |
---|
[86a80ee1] | 21 | #if BSP_VERBOSE_FATAL_EXTENSION |
---|
| 22 | printk( |
---|
| 23 | "\n" |
---|
| 24 | "*** FATAL ***\n" |
---|
| 25 | "fatal source: %i (%s)\n" |
---|
| 26 | "fatal code: %ju (0x%08jx)\n" |
---|
| 27 | "RTEMS version: %s\n" |
---|
| 28 | "RTEMS tools: %s\n", |
---|
| 29 | source, |
---|
| 30 | rtems_fatal_source_text( source ), |
---|
| 31 | (uintmax_t) code, |
---|
| 32 | (uintmax_t) code, |
---|
| 33 | rtems_version(), |
---|
| 34 | __VERSION__ |
---|
| 35 | ); |
---|
| 36 | #endif |
---|
| 37 | |
---|
| 38 | #if (BSP_PRINT_EXCEPTION_CONTEXT) || BSP_VERBOSE_FATAL_EXTENSION |
---|
[b61f58f] | 39 | if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) { |
---|
| 40 | rtems_exception_frame_print( (const rtems_exception_frame *) code ); |
---|
| 41 | } |
---|
| 42 | #endif |
---|
| 43 | |
---|
[54cf1198] | 44 | #if (BSP_PRESS_KEY_FOR_RESET) |
---|
[b61f58f] | 45 | printk( "\nFATAL ERROR - Executive shutdown! Any key to reboot..." ); |
---|
[54cf1198] | 46 | |
---|
| 47 | /* |
---|
| 48 | * Wait for a key to be pressed |
---|
| 49 | */ |
---|
| 50 | while ( getchark() == -1 ) |
---|
| 51 | ; |
---|
| 52 | |
---|
| 53 | printk("\n"); |
---|
| 54 | #endif |
---|
| 55 | |
---|
| 56 | /* |
---|
| 57 | * Check both conditions -- if you want to ask for reboot, then |
---|
| 58 | * you must have meant to reset the board. |
---|
| 59 | */ |
---|
| 60 | #if (BSP_PRESS_KEY_FOR_RESET) || (BSP_RESET_BOARD_AT_EXIT) |
---|
| 61 | bsp_reset(); |
---|
[359e537] | 62 | #endif |
---|
[e2a2ec60] | 63 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.