4.115
Last change
on this file since c499856 was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-1999. |
---|
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 |
---|
7 | * http://www.rtems.org/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #include <bsp.h> |
---|
11 | #include <bsp/bootcard.h> |
---|
12 | #include <rtems/bspIo.h> |
---|
13 | |
---|
14 | /* |
---|
15 | * Ugly hack.... _CPU_Fatal_halt() disonnects the bdm. Without this |
---|
16 | * change, the_error is only known only to the cpu :). |
---|
17 | */ |
---|
18 | |
---|
19 | #define RAW_PUTS(str) \ |
---|
20 | { register char *ptr = str; \ |
---|
21 | while (*ptr) outbyte(*ptr++); \ |
---|
22 | } |
---|
23 | |
---|
24 | #define RAW_PUTI(n) { \ |
---|
25 | register int i, j; \ |
---|
26 | \ |
---|
27 | RAW_PUTS("0x"); \ |
---|
28 | for (i=28;i>=0;i -= 4) { \ |
---|
29 | j = (n>>i) & 0xf; \ |
---|
30 | outbyte( (j>9 ? j-10+'a' : j+'0') ); \ |
---|
31 | } \ |
---|
32 | } |
---|
33 | |
---|
34 | void bsp_fatal_extension( |
---|
35 | rtems_fatal_source source, |
---|
36 | bool is_internal, |
---|
37 | rtems_fatal_code the_error |
---|
38 | ) |
---|
39 | { |
---|
40 | /* try to print error message to outbyte */ |
---|
41 | RAW_PUTS("\r\nRTEMS: A fatal error has occured.\r\n"); |
---|
42 | RAW_PUTS("RTEMS: fatal error "); |
---|
43 | RAW_PUTI( the_error ); |
---|
44 | RAW_PUTS(" ("); |
---|
45 | outbyte( (char)((the_error>>24) & 0xff) ); |
---|
46 | outbyte( (char)((the_error>>16) & 0xff) ); |
---|
47 | outbyte( (char)((the_error>>8) & 0xff) ); |
---|
48 | outbyte( (char)(the_error & 0xff) ); |
---|
49 | RAW_PUTS(").\r\n"); |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.