[PATCH 8/8] bsps/sparc: Add BSP_INITIAL_EXTENSION to <bsp.h>

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Nov 7 16:06:03 UTC 2012


The bsp_fatal_extension() will call BSP_fatal_return().
---
 c/src/lib/libbsp/sparc/erc32/Makefile.am           |    1 +
 c/src/lib/libbsp/sparc/erc32/include/bsp.h         |    2 +
 c/src/lib/libbsp/sparc/leon2/Makefile.am           |    1 +
 c/src/lib/libbsp/sparc/leon2/include/bsp.h         |    2 +
 c/src/lib/libbsp/sparc/leon3/Makefile.am           |    1 +
 c/src/lib/libbsp/sparc/leon3/include/bsp.h         |    2 +
 .../sparc/shared/startup/bspfatalextension.c       |   24 ++++++++++++++++++++
 7 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100644 c/src/lib/libbsp/sparc/shared/startup/bspfatalextension.c

diff --git a/c/src/lib/libbsp/sparc/erc32/Makefile.am b/c/src/lib/libbsp/sparc/erc32/Makefile.am
index ddb8d94..4f23ff1 100644
--- a/c/src/lib/libbsp/sparc/erc32/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/Makefile.am
@@ -29,6 +29,7 @@ libbsp_a_SOURCES =
 
 # startup
 libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
+    ../shared/startup/bspfatalextension.c \
     startup/bsppredriver.c ../../sparc/shared/bspgetworkarea.c \
     ../../sparc/shared/bsppretaskinghook.c ../../shared/bsppost.c \
     ../../shared/bspstart.c ../../shared/bootcard.c ../../shared/bspinit.c \
diff --git a/c/src/lib/libbsp/sparc/erc32/include/bsp.h b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
index 26d4d2f..3fb9f13 100644
--- a/c/src/lib/libbsp/sparc/erc32/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/erc32/include/bsp.h
@@ -33,6 +33,8 @@ extern "C" {
 #include <rtems/console.h>
 #include <rtems/irq-extension.h>
 
+#include <bsp/default-initial-extension.h>
+
 /*
  *  BSP provides its own Idle thread body
  */
diff --git a/c/src/lib/libbsp/sparc/leon2/Makefile.am b/c/src/lib/libbsp/sparc/leon2/Makefile.am
index 9699bf1..f33c693 100644
--- a/c/src/lib/libbsp/sparc/leon2/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon2/Makefile.am
@@ -46,6 +46,7 @@ libbsp_a_SOURCES =
 
 # startup
 libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
+    ../shared/startup/bspfatalextension.c \
     ../../shared/bsppost.c startup/bsppredriver.c \
     startup/bspstart.c ../../sparc/shared/bsppretaskinghook.c \
     ../../sparc/shared/bspgetworkarea.c ../../shared/bootcard.c \
diff --git a/c/src/lib/libbsp/sparc/leon2/include/bsp.h b/c/src/lib/libbsp/sparc/leon2/include/bsp.h
index dbefc34..009ae52 100644
--- a/c/src/lib/libbsp/sparc/leon2/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/leon2/include/bsp.h
@@ -32,6 +32,8 @@ extern "C" {
 #include <rtems/console.h>
 #include <rtems/irq-extension.h>
 
+#include <bsp/default-initial-extension.h>
+
 /* SPARC CPU variant: LEON2 */
 #define LEON2 1
 
diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am
index 8b21893..dcdf1b0 100644
--- a/c/src/lib/libbsp/sparc/leon3/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am
@@ -30,6 +30,7 @@ libbsp_a_SOURCES =
 
 # startup
 libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
+    ../shared/startup/bspfatalextension.c \
     ../../shared/bsppost.c ../../shared/bootcard.c startup/bspstart.c \
     ../../sparc/shared/bsppretaskinghook.c startup/bsppredriver.c \
     ../../sparc/shared/bspgetworkarea.c ../../shared/sbrk.c startup/setvec.c \
diff --git a/c/src/lib/libbsp/sparc/leon3/include/bsp.h b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
index 31e527e..10697d5 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/bsp.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/bsp.h
@@ -32,6 +32,8 @@ extern "C" {
 #include <rtems/console.h>
 #include <rtems/irq-extension.h>
 
+#include <bsp/default-initial-extension.h>
+
 /* SPARC CPU variant: LEON3 */
 #define LEON3 1
 
diff --git a/c/src/lib/libbsp/sparc/shared/startup/bspfatalextension.c b/c/src/lib/libbsp/sparc/shared/startup/bspfatalextension.c
new file mode 100644
index 0000000..1054688
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/shared/startup/bspfatalextension.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Obere Lagerstr. 30
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#include <bsp.h>
+
+void bsp_fatal_extension(
+  Internal_errors_Source source,
+  bool is_internal,
+  Internal_errors_t error
+)
+{
+  BSP_fatal_return();
+}
-- 
1.7.7




More information about the devel mailing list