From b8051837488cf5883b3a1a2f5a056bdc93ece526 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 8 Jan 2013 10:13:46 -0600 Subject: 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(-) create mode 100644 c/src/lib/libbsp/arm/gp32/startup/bspidle.c (limited to 'c/src') diff --git a/c/src/lib/libbsp/arm/gp32/Makefile.am b/c/src/lib/libbsp/arm/gp32/Makefile.am index a136ea6983..92dfc72b0c 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 be542e9dbb..a6671a80dc 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@crf.canon.fr + * Copyright (c) Canon Research France SA.] + * Emmanuel Raguet, mailto:raguet@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 0000000000..bdd8fcccd9 --- /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@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 + +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 cfedc24c39..79a97aad13 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@crf.canon.fr * - * - * Copyright (c) 2000 Canon Research Centre France SA. - * Emmanuel Raguet, mailto:raguet@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 @@ -22,16 +23,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 */ -- cgit v1.2.3