summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/mcf5225x
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-14 09:59:10 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-15 15:33:12 +0100
commita052181ca2e243540342315cde990b9471331a8e (patch)
tree2e8dfd9152bfc1d37fcb05f58de9d6b0e80eb8b3 /c/src/lib/libbsp/m68k/mcf5225x
parentscore: Add RTEMS_FATAL_SOURCE_APPLICATION (diff)
downloadrtems-a052181ca2e243540342315cde990b9471331a8e.tar.bz2
score: Add RTEMS_FATAL_SOURCE_EXIT
Include <bsp/default-initial-extension.h> in all BSPs. Call rtems_fatal() with RTEMS_FATAL_SOURCE_EXIT as source and the exit() status code as fatal code in every bsp_cleanup(). Move previous bsp_cleanup() code into bsp_fatal_extension().
Diffstat (limited to 'c/src/lib/libbsp/m68k/mcf5225x')
-rw-r--r--c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h1
-rw-r--r--c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c15
2 files changed, 11 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h b/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h
index 13a189f5d2..2a419d77a1 100644
--- a/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/mcf5225x/include/bsp.h
@@ -12,6 +12,7 @@ extern "C" {
#endif
#include <bspopts.h>
+#include <bsp/default-initial-extension.h>
#include <rtems.h>
#include <rtems/iosupp.h>
#include <rtems/console.h>
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c b/c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c
index fb538904df..e8c70c326f 100644
--- a/c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mcf5225x/startup/bspclean.c
@@ -19,13 +19,18 @@
#include <bsp/bootcard.h>
#include <rtems/bspIo.h>
+void bsp_fatal_extension(
+ rtems_fatal_source source,
+ bool is_internal,
+ rtems_fatal_code error
+)
+{
+ printk("\nRTEMS exited!\n");
+}
+
void __attribute__((weak)) bsp_cleanup(
uint32_t status
)
{
- printk("\nRTEMS exited!\n");
- for (;;) {
- __asm__ volatile (" nop ");
- __asm__ volatile (" nop ");
- }
+ rtems_fatal( RTEMS_FATAL_SOURCE_EXIT, status );
}