[rtems commit] arm/gp32: Correct compilation error in BSP Idle Thread

Joel Sherrill joel at rtems.org
Tue Jan 8 16:09:53 UTC 2013


Module:    rtems
Branch:    master
Commit:    b8051837488cf5883b3a1a2f5a056bdc93ece526
Changeset: http://git.rtems.org/rtems/commit/?id=b8051837488cf5883b3a1a2f5a056bdc93ece526

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Tue Jan  8 10:13:46 2013 -0600

arm/gp32: Correct compilation error in BSP Idle Thread

Split BSP Idle Thread into separate file to follow convention
used on other BSPs.

Slight reformatting of file header comment block.

---

 c/src/lib/libbsp/arm/gp32/Makefile.am        |    2 +-
 c/src/lib/libbsp/arm/gp32/include/bsp.h      |   12 ++++++------
 c/src/lib/libbsp/arm/gp32/startup/bspidle.c  |   23 +++++++++++++++++++++++
 c/src/lib/libbsp/arm/gp32/startup/bspstart.c |   25 ++++++++-----------------
 4 files changed, 38 insertions(+), 24 deletions(-)

diff --git a/c/src/lib/libbsp/arm/gp32/Makefile.am b/c/src/lib/libbsp/arm/gp32/Makefile.am
index a136ea6..92dfc72 100644
--- a/c/src/lib/libbsp/arm/gp32/Makefile.am
+++ b/c/src/lib/libbsp/arm/gp32/Makefile.am
@@ -30,7 +30,7 @@ libbsp_a_SOURCES =
 # startup
 libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \
     ../../shared/bsppredriverhook.c ../../shared/bspgetworkarea.c \
-    ../../shared/bsppretaskinghook.c startup/bspstart.c \
+    ../../shared/bsppretaskinghook.c startup/bspstart.c startup/bspidle.c \
     ../../shared/bspclean.c startup/bspreset.c \
     startup/memmap.c ../../shared/bootcard.c ../../shared/sbrk.c \
     ../../shared/gnatinstallhandler.c
diff --git a/c/src/lib/libbsp/arm/gp32/include/bsp.h b/c/src/lib/libbsp/arm/gp32/include/bsp.h
index be542e9..a6671a8 100644
--- a/c/src/lib/libbsp/arm/gp32/include/bsp.h
+++ b/c/src/lib/libbsp/arm/gp32/include/bsp.h
@@ -1,12 +1,12 @@
 /**
  *  @file
  * 
- * This include file contains definitions related to the GP32 BSP.
+ *  This include file contains definitions related to the GP32 BSP.
  */
 
 /*
- * Copyright (c) Canon Research France SA.]
- * Emmanuel Raguet, mailto:raguet at crf.canon.fr
+ *  Copyright (c) Canon Research France SA.]
+ *  Emmanuel Raguet, mailto:raguet at crf.canon.fr
  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
@@ -59,13 +59,13 @@ void gp32_setPalette( unsigned char pos, uint16_t color);
 
 
 /*
- *  This BSP provides its own IDLE task to override the RTEMS one.
+ *  This BSP provides its own IDLE thread to override the RTEMS one.
  *  So we prototype it and define the constant confdefs.h expects
  *  to configure a BSP specific one.
  */
-Thread bsp_idle_task(uint32_t);
+void *bsp_idle_thread(uintptr_t ignored);
 
-#define BSP_IDLE_TASK_BODY bsp_idle_task
+#define BSP_IDLE_TASK_BODY bsp_idle_thread
 
 #ifdef __cplusplus
 }
diff --git a/c/src/lib/libbsp/arm/gp32/startup/bspidle.c b/c/src/lib/libbsp/arm/gp32/startup/bspidle.c
new file mode 100644
index 0000000..bdd8fcc
--- /dev/null
+++ b/c/src/lib/libbsp/arm/gp32/startup/bspidle.c
@@ -0,0 +1,23 @@
+/*
+ *  BSP specific Idle thread
+ */
+
+/*
+ *  Copyright (c) 2000 Canon Research Centre France SA.
+ *  Emmanuel Raguet, mailto:raguet at crf.canon.fr
+ *
+ *  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_idle_thread(uintptr_t ignored)
+{
+  while(1) {
+    __asm__ volatile ("MCR p15,0,r0,c7,c0,4     \n");
+  }
+  return NULL;
+}
+
diff --git a/c/src/lib/libbsp/arm/gp32/startup/bspstart.c b/c/src/lib/libbsp/arm/gp32/startup/bspstart.c
index cfedc24..79a97aa 100644
--- a/c/src/lib/libbsp/arm/gp32/startup/bspstart.c
+++ b/c/src/lib/libbsp/arm/gp32/startup/bspstart.c
@@ -2,14 +2,15 @@
  * This file contains the ARM BSP startup package. It includes application,
  * board, and monitor specific initialization and configuration. The generic CPU
  * dependent initialization has been performed before this routine is invoked.
+ */
+
+/*
+ *  Copyright (c) 2000 Canon Research Centre France SA.
+ *  Emmanuel Raguet, mailto:raguet at crf.canon.fr
  *
- *
- * Copyright (c) 2000 Canon Research Centre France SA.
- * Emmanuel Raguet, mailto:raguet at crf.canon.fr
- *
- *   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.
+ *  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>
@@ -23,16 +24,6 @@
 extern void rtems_exception_init_mngt(void);
 
 /*
- *  BSP specific Idle task
- */
-Thread bsp_idle_task(uint32_t ignored)
-{
-  while(1) {
-    __asm__ volatile ("MCR p15,0,r0,c7,c0,4     \n");
-  }
-}
-
-/*
  *  BSP Specific Initialization in C
  */
 void bsp_start_default( void )




More information about the vc mailing list