Changeset 86a80ee1 in rtems


Ignore:
Timestamp:
Nov 21, 2017, 12:30:26 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
f64f7a2f
Parents:
3dd381f
git-author:
Sebastian Huber <sebastian.huber@…> (11/21/17 12:30:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/22/17 08:40:24)
Message:

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.

Location:
c/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/aclocal/bsp-bspcleanup-options.m4

    r3dd381f r86a80ee1  
    2222RTEMS_BSPOPTS_HELP([BSP_PRINT_EXCEPTION_CONTEXT],
    2323[If defined to a non-zero value, prints the exception context when an
    24 unexpected exception occurs.])])
     24unexpected exception occurs.])
     25
     26RTEMS_BSPOPTS_SET([BSP_VERBOSE_FATAL_EXTENSION],[*],[1])
     27RTEMS_BSPOPTS_HELP([BSP_VERBOSE_FATAL_EXTENSION],
     28[If defined to a non-zero value, prints the some information in case of a fatal
     29error.])])
  • c/src/lib/libbsp/shared/bspclean.c

    r3dd381f r86a80ee1  
    1111#include <bsp/bootcard.h>
    1212#include <rtems/bspIo.h>
     13#include <rtems/version.h>
    1314
    1415void bsp_fatal_extension(
     
    1819)
    1920{
    20   #if (BSP_PRINT_EXCEPTION_CONTEXT)
     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
    2139    if ( source == RTEMS_FATAL_SOURCE_EXCEPTION ) {
    2240      rtems_exception_frame_print( (const rtems_exception_frame *) code );
Note: See TracChangeset for help on using the changeset viewer.