diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-22 21:50:40 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-22 21:50:40 +0000 |
commit | 17623751c4e0631498dd6a6ae3e055e4375b5c92 (patch) | |
tree | d4926b6c847a24801076a5a5098dca4d3fb8fba2 /c/src/lib | |
parent | 2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-17623751c4e0631498dd6a6ae3e055e4375b5c92.tar.bz2 |
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Use standardized bsp_cleanup() which can
optionally print a message, poll for user to press key, and call
bsp_reset(). Using this eliminates the various bsp_cleanup()
implementations which had their own implementation and variety of
string constants.
* startup/bspclean.c: Removed.
Diffstat (limited to 'c/src/lib')
20 files changed, 102 insertions, 192 deletions
diff --git a/c/src/lib/libbsp/arm/nds/ChangeLog b/c/src/lib/libbsp/arm/nds/ChangeLog index d119cb77ad..c24dd39e83 100644 --- a/c/src/lib/libbsp/arm/nds/ChangeLog +++ b/c/src/lib/libbsp/arm/nds/ChangeLog @@ -1,3 +1,12 @@ +2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> + + * Makefile.am, configure.ac: Use standardized bsp_cleanup() which can + optionally print a message, poll for user to press key, and call + bsp_reset(). Using this eliminates the various bsp_cleanup() + implementations which had their own implementation and variety of + string constants. + * startup/bspclean.c: Removed. + 2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile.am, configure.ac: Split out bsp_cleanup() and diff --git a/c/src/lib/libbsp/arm/nds/Makefile.am b/c/src/lib/libbsp/arm/nds/Makefile.am index 20282cc788..445a6eec6a 100644 --- a/c/src/lib/libbsp/arm/nds/Makefile.am +++ b/c/src/lib/libbsp/arm/nds/Makefile.am @@ -32,9 +32,9 @@ include_rtems_HEADERS = fb/fb.h touchscreen/touchscreen.h sound/sound.h noinst_PROGRAMS += startup.rel startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \ - startup/bspstart.c startup/bspclean.c startup/bspgetworkarea.c \ - ../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \ - ../../shared/bootcard.c + startup/bspstart.c ../../shared/bspclean.c startup/bspreset.c \ + startup/bspgetworkarea.c ../../shared/bsppredriverhook.c \ + ../../shared/bsppretaskinghook.c ../../shared/bootcard.c startup_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) diff --git a/c/src/lib/libbsp/arm/nds/configure.ac b/c/src/lib/libbsp/arm/nds/configure.ac index 785b24cde2..4196a55de0 100644 --- a/c/src/lib/libbsp/arm/nds/configure.ac +++ b/c/src/lib/libbsp/arm/nds/configure.ac @@ -25,6 +25,15 @@ RTEMS_CONFIG_BUILD_SUBDIRS(tools) ## $srcdir/mk_libnds.sh $srcdir +RTEMS_BSPOPTS_SET([BSP_PRESS_KEY_FOR_RESET],[*],[1]) +RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET], +[If defined, print a message and wait until pressed before resetting + board when application exits.]) + +RTEMS_BSPOPTS_SET([BSP_RESET_BOARD_AT_EXIT],[*],[1]) +RTEMS_BSPOPTS_HELP([BSP_RESET_BOARD_AT_EXIT], +[If defined, reset the board when the application exits.]) + RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION # Explicitly list all Makefiles here diff --git a/c/src/lib/libbsp/arm/nds/startup/bspclean.c b/c/src/lib/libbsp/arm/nds/startup/bspclean.c deleted file mode 100644 index bdfb9d746f..0000000000 --- a/c/src/lib/libbsp/arm/nds/startup/bspclean.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This is a dummy bsp_cleanup routine. - * - * 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.com/license/LICENSE. - * - * $Id$ - */ - -#include <bsp.h> -#include <bsp/bootcard.h> -#include <nds.h> - -/* - * reset the platform using bios call. - */ -void bsp_reset (void) -{ - swiSoftReset (); -} - -void bsp_cleanup( void ) -{ - printk ("[!] executive ended, rebooting\n"); - - bsp_reset (); -} diff --git a/c/src/lib/libbsp/m68k/av5282/ChangeLog b/c/src/lib/libbsp/m68k/av5282/ChangeLog index 84628e6f35..d5d2ac605d 100644 --- a/c/src/lib/libbsp/m68k/av5282/ChangeLog +++ b/c/src/lib/libbsp/m68k/av5282/ChangeLog @@ -1,3 +1,12 @@ +2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> + + * Makefile.am, configure.ac: Use standardized bsp_cleanup() which can + optionally print a message, poll for user to press key, and call + bsp_reset(). Using this eliminates the various bsp_cleanup() + implementations which had their own implementation and variety of + string constants. + * startup/bspclean.c: Removed. + 2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com> * include/bsp.h: Remove unnecessary boilerplate comments. diff --git a/c/src/lib/libbsp/m68k/av5282/Makefile.am b/c/src/lib/libbsp/m68k/av5282/Makefile.am index 9697f5335b..3f8b8506e4 100644 --- a/c/src/lib/libbsp/m68k/av5282/Makefile.am +++ b/c/src/lib/libbsp/m68k/av5282/Makefile.am @@ -25,8 +25,8 @@ project_lib_DATA = start.$(OBJEXT) dist_project_lib_DATA += startup/linkcmds -startup_SOURCES = startup/bspclean.c ../../shared/bsppredriverhook.c \ - ../../shared/bsplibc.c ../../shared/bsppost.c \ +startup_SOURCES = ../../shared/bspclean.c ../../shared/bsppredriverhook.c \ + ../../shared/bsplibc.c ../../shared/bsppost.c ../../shared/bspreset_loop.c \ ../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \ startup/init5282.c startup/bspstart.c \ ../../shared/bootcard.c \ diff --git a/c/src/lib/libbsp/m68k/av5282/configure.ac b/c/src/lib/libbsp/m68k/av5282/configure.ac index d11df33e42..c128ff9f08 100644 --- a/c/src/lib/libbsp/m68k/av5282/configure.ac +++ b/c/src/lib/libbsp/m68k/av5282/configure.ac @@ -19,6 +19,15 @@ RTEMS_CHECK_NETWORKING AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes") +RTEMS_BSPOPTS_SET([BSP_PRESS_KEY_FOR_RESET],[*],[0]) +RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET], +[If defined, print a message and wait until pressed before resetting + board when application exits.]) + +RTEMS_BSPOPTS_SET([BSP_RESET_BOARD_AT_EXIT],[*],[1]) +RTEMS_BSPOPTS_HELP([BSP_RESET_BOARD_AT_EXIT], +[If defined, reset the board when the application exits.]) + RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION # Explicitly list all Makefiles here diff --git a/c/src/lib/libbsp/m68k/av5282/startup/bspclean.c b/c/src/lib/libbsp/m68k/av5282/startup/bspclean.c deleted file mode 100644 index 7bddc13392..0000000000 --- a/c/src/lib/libbsp/m68k/av5282/startup/bspclean.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SBC5206 bsp_cleanup - * - * This routine returns control from RTEMS to the monitor. - * - * Author: - * David Fiddes, D.J@fiddes.surfaid.org - * http://www.calm.hw.ac.uk/davidf/coldfire/ - * - * COPYRIGHT (c) 1989-1998. - * 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.com/license/LICENSE. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> -#include <rtems/bspIo.h> - -void bsp_cleanup( void ) -{ - printk("\nRTEMS exited!\n"); - for ( ;; ) - { - asm volatile ( " nop " ); - asm volatile ( " nop " ); - } - -} diff --git a/c/src/lib/libbsp/m68k/mcf5235/ChangeLog b/c/src/lib/libbsp/m68k/mcf5235/ChangeLog index b17d627b81..f478bf7f2e 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/ChangeLog +++ b/c/src/lib/libbsp/m68k/mcf5235/ChangeLog @@ -1,3 +1,12 @@ +2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> + + * Makefile.am, configure.ac: Use standardized bsp_cleanup() which can + optionally print a message, poll for user to press key, and call + bsp_reset(). Using this eliminates the various bsp_cleanup() + implementations which had their own implementation and variety of + string constants. + * startup/bspclean.c: Removed. + 2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile.am, startup/bspstart.c: Split out bspstart contents. Move diff --git a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am index 737bde8a50..bfb9a42efb 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am +++ b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am @@ -26,8 +26,8 @@ project_lib_DATA = start.$(OBJEXT) dist_project_lib_DATA += startup/linkcmds startup/linkcmdsflash \ startup/linkcmdsram -startup_SOURCES = startup/bspclean.c ../../shared/bsppredriverhook.c \ - ../../shared/bsplibc.c ../../shared/bsppost.c \ +startup_SOURCES = ../../shared/bspclean.c ../../shared/bsppredriverhook.c \ + ../../shared/bsplibc.c ../../shared/bsppost.c ../../shared/bspreset_loop.c \ startup/bspgetcpuclockspeed.c ../../shared/bsppretaskinghook.c \ ../../shared/bspgetworkarea.c startup/init5235.c startup/bspstart.c \ ../../shared/bootcard.c ../../shared/sbrk.c ../../m68k/shared/setvec.c \ diff --git a/c/src/lib/libbsp/m68k/mcf5235/configure.ac b/c/src/lib/libbsp/m68k/mcf5235/configure.ac index b89e18b355..79bfa4cb8f 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/configure.ac +++ b/c/src/lib/libbsp/m68k/mcf5235/configure.ac @@ -21,6 +21,15 @@ RTEMS_CHECK_NETWORKING AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes") +RTEMS_BSPOPTS_SET([BSP_PRESS_KEY_FOR_RESET],[*],[0]) +RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET], +[If defined, print a message and wait until pressed before resetting + board when application exits.]) + +RTEMS_BSPOPTS_SET([BSP_RESET_BOARD_AT_EXIT],[*],[1]) +RTEMS_BSPOPTS_HELP([BSP_RESET_BOARD_AT_EXIT], +[If defined, reset the board when the application exits.]) + RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION # Explicitly list all Makefiles here diff --git a/c/src/lib/libbsp/m68k/mcf5235/startup/bspclean.c b/c/src/lib/libbsp/m68k/mcf5235/startup/bspclean.c deleted file mode 100644 index 7bddc13392..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5235/startup/bspclean.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SBC5206 bsp_cleanup - * - * This routine returns control from RTEMS to the monitor. - * - * Author: - * David Fiddes, D.J@fiddes.surfaid.org - * http://www.calm.hw.ac.uk/davidf/coldfire/ - * - * COPYRIGHT (c) 1989-1998. - * 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.com/license/LICENSE. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> -#include <rtems/bspIo.h> - -void bsp_cleanup( void ) -{ - printk("\nRTEMS exited!\n"); - for ( ;; ) - { - asm volatile ( " nop " ); - asm volatile ( " nop " ); - } - -} diff --git a/c/src/lib/libbsp/powerpc/haleakala/ChangeLog b/c/src/lib/libbsp/powerpc/haleakala/ChangeLog index 53726ebd61..33a11e3660 100644 --- a/c/src/lib/libbsp/powerpc/haleakala/ChangeLog +++ b/c/src/lib/libbsp/powerpc/haleakala/ChangeLog @@ -1,3 +1,12 @@ +2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> + + * Makefile.am, configure.ac: Use standardized bsp_cleanup() which can + optionally print a message, poll for user to press key, and call + bsp_reset(). Using this eliminates the various bsp_cleanup() + implementations which had their own implementation and variety of + string constants. + * startup/bspclean.c: Removed. + 2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile.am, startup/linkcmds: Use top level shared diff --git a/c/src/lib/libbsp/powerpc/haleakala/Makefile.am b/c/src/lib/libbsp/powerpc/haleakala/Makefile.am index b514014248..b20b579239 100644 --- a/c/src/lib/libbsp/powerpc/haleakala/Makefile.am +++ b/c/src/lib/libbsp/powerpc/haleakala/Makefile.am @@ -28,8 +28,9 @@ project_lib_DATA = rtems_crti.$(OBJEXT) dist_project_lib_DATA += startup/linkcmds -startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \ - ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \ +startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \ + ../../shared/bspreset_fatal.c ../../shared/bsppost.c \ + startup/bspstart.c ../../shared/bootcard.c \ ../../shared/bsppredriverhook.c ../../shared/bspgetworkarea.c \ ../../shared/bsppretaskinghook.c ../../shared/sbrk.c \ ../../shared/gnatinstallhandler.c diff --git a/c/src/lib/libbsp/powerpc/haleakala/configure.ac b/c/src/lib/libbsp/powerpc/haleakala/configure.ac index d05b039c3d..dd443a8136 100644 --- a/c/src/lib/libbsp/powerpc/haleakala/configure.ac +++ b/c/src/lib/libbsp/powerpc/haleakala/configure.ac @@ -31,6 +31,15 @@ RTEMS_BSPOPTS_HELP([PPC_VECTOR_FILE_BASE], [This defines the base address of the exception table. NOTE: Vectors are actually at 0xFFF00000 but file starts at offset.]) +RTEMS_BSPOPTS_SET([BSP_PRESS_KEY_FOR_RESET],[*],[0]) +RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET], +[If defined, print a message and wait until pressed before resetting + board when application exits.]) + +RTEMS_BSPOPTS_SET([BSP_RESET_BOARD_AT_EXIT],[*],[1]) +RTEMS_BSPOPTS_HELP([BSP_RESET_BOARD_AT_EXIT], +[If defined, reset the board when the application exits.]) + RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION # Explicitly list all Makefiles here diff --git a/c/src/lib/libbsp/powerpc/haleakala/startup/bspclean.c b/c/src/lib/libbsp/powerpc/haleakala/startup/bspclean.c deleted file mode 100644 index 56699da354..0000000000 --- a/c/src/lib/libbsp/powerpc/haleakala/startup/bspclean.c +++ /dev/null @@ -1,43 +0,0 @@ -/* bsp_cleanup() - * - * This routine normally is part of start.s and usually returns - * control to a monitor. - * - * INPUT: NONE - * - * OUTPUT: NONE - * - * Author: Andrew Bray <andy@i-cubed.co.uk> - * - * COPYRIGHT (c) 1995 by i-cubed ltd. - * - * To anyone who acknowledges that this file is provided "AS IS" - * without any express or implied warranty: - * permission to use, copy, modify, and distribute this file - * for any purpose is hereby granted without fee, provided that - * the above copyright notice and this notice appears in all - * copies, and that the name of i-cubed limited not be used in - * advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. - * i-cubed limited makes no representations about the suitability - * of this software for any purpose. - * - * Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/bspclean.c: - * - * 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.com/license/LICENSE. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> - -void bsp_cleanup( void ) -{ - rtems_fatal_error_occurred(0); -} diff --git a/c/src/lib/libbsp/sh/gensh1/ChangeLog b/c/src/lib/libbsp/sh/gensh1/ChangeLog index ac7abc2218..4b94138c89 100644 --- a/c/src/lib/libbsp/sh/gensh1/ChangeLog +++ b/c/src/lib/libbsp/sh/gensh1/ChangeLog @@ -1,3 +1,12 @@ +2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> + + * Makefile.am, configure.ac: Use standardized bsp_cleanup() which can + optionally print a message, poll for user to press key, and call + bsp_reset(). Using this eliminates the various bsp_cleanup() + implementations which had their own implementation and variety of + string constants. + * startup/bspclean.c: Removed. + 2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com> * Makefile.am, startup/linkcmds: Use top level shared diff --git a/c/src/lib/libbsp/sh/gensh1/Makefile.am b/c/src/lib/libbsp/sh/gensh1/Makefile.am index 50cae8f020..eb1274992e 100644 --- a/c/src/lib/libbsp/sh/gensh1/Makefile.am +++ b/c/src/lib/libbsp/sh/gensh1/Makefile.am @@ -35,7 +35,8 @@ BUILT_SOURCES = scitab.c CLEANFILES = scitab.c startup_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \ - ../../shared/bsppredriverhook.c ../shared/bspstart.c startup/bspclean.c \ + ../../shared/bsppredriverhook.c ../shared/bspstart.c \ + ../../shared/bspclean.c ../../shared/bspreset_fatal.c \ ../../shared/bspgetworkarea.c ../../shared/bsppretaskinghook.c \ ../../shared/sbrk.c ../../shared/bootcard.c ../shared/bsphwinit.c \ ../../shared/gnatinstallhandler.c diff --git a/c/src/lib/libbsp/sh/gensh1/configure.ac b/c/src/lib/libbsp/sh/gensh1/configure.ac index a95cb775d2..41c8574c1d 100644 --- a/c/src/lib/libbsp/sh/gensh1/configure.ac +++ b/c/src/lib/libbsp/sh/gensh1/configure.ac @@ -27,6 +27,15 @@ RTEMS_BSPOPTS_HELP([START_HW_INIT], ## Used in scitab/Makefile.am AC_SUBST(CPU_CLOCK_RATE_HZ) +RTEMS_BSPOPTS_SET([BSP_PRESS_KEY_FOR_RESET],[*],[0]) +RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET], +[If defined, print a message and wait until pressed before resetting + board when application exits.]) + +RTEMS_BSPOPTS_SET([BSP_RESET_BOARD_AT_EXIT],[*],[1]) +RTEMS_BSPOPTS_HELP([BSP_RESET_BOARD_AT_EXIT], +[If defined, reset the board when the application exits.]) + RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION # Explicitly list all Makefiles here diff --git a/c/src/lib/libbsp/sh/gensh1/startup/bspclean.c b/c/src/lib/libbsp/sh/gensh1/startup/bspclean.c deleted file mode 100644 index 59f0977919..0000000000 --- a/c/src/lib/libbsp/sh/gensh1/startup/bspclean.c +++ /dev/null @@ -1,40 +0,0 @@ -/* bsp_cleanup() - * - * This routine normally is part of start.s and usually returns - * control to a monitor. - * - * INPUT: NONE - * - * OUTPUT: NONE - * - * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and - * Bernd Becker (becker@faw.uni-ulm.de) - * - * COPYRIGHT (c) 1997-1998, FAW Ulm, Germany - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU General Public License - * along with this program; If not, write to the Free Software Foundation, - * 675 Mass Ave, Cambridge, MA 02139, USA. - * - * - * COPYRIGHT (c) 1998. - * 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.com/license/LICENSE. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> - -void bsp_cleanup( void ) -{ - rtems_fatal_error_occurred(0); -} |