summaryrefslogtreecommitdiffstats
path: root/bsps/m68k
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-25 10:32:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-25 11:02:23 +0200
commit0e15ba3ea3729ca424011eae00d160f8b9d458a1 (patch)
treef2d5bc54c1e580f3252bcba8ce875539420436df /bsps/m68k
parentbsp/mrm332: Move spinit.c to bsps (diff)
downloadrtems-0e15ba3ea3729ca424011eae00d160f8b9d458a1.tar.bz2
bsp/mrm332: Move interr.c to bsps
This patch is a part of the BSP source reorganization. Update #3285.
Diffstat (limited to 'bsps/m68k')
-rw-r--r--bsps/m68k/mrm332/start/interr.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/bsps/m68k/mrm332/start/interr.c b/bsps/m68k/mrm332/start/interr.c
new file mode 100644
index 0000000000..b1eaf1371e
--- /dev/null
+++ b/bsps/m68k/mrm332/start/interr.c
@@ -0,0 +1,50 @@
+/*
+ * COPYRIGHT (c) 1989-1999.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <bsp.h>
+#include <bsp/bootcard.h>
+#include <rtems/bspIo.h>
+
+/*
+ * Ugly hack.... _CPU_Fatal_halt() disonnects the bdm. Without this
+ * change, the_error is only known only to the cpu :).
+ */
+
+#define RAW_PUTS(str) \
+ { register char *ptr = str; \
+ while (*ptr) outbyte(*ptr++); \
+ }
+
+#define RAW_PUTI(n) { \
+ register int i, j; \
+ \
+ RAW_PUTS("0x"); \
+ for (i=28;i>=0;i -= 4) { \
+ j = (n>>i) & 0xf; \
+ outbyte( (j>9 ? j-10+'a' : j+'0') ); \
+ } \
+ }
+
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool always_set_to_false,
+ rtems_fatal_code the_error
+)
+{
+ /* try to print error message to outbyte */
+ RAW_PUTS("\r\nRTEMS: A fatal error has occured.\r\n");
+ RAW_PUTS("RTEMS: fatal error ");
+ RAW_PUTI( the_error );
+ RAW_PUTS(" (");
+ outbyte( (char)((the_error>>24) & 0xff) );
+ outbyte( (char)((the_error>>16) & 0xff) );
+ outbyte( (char)((the_error>>8) & 0xff) );
+ outbyte( (char)(the_error & 0xff) );
+ RAW_PUTS(").\r\n");
+}