From 87a38dd39f97b0ecf616309ca2506294f51d1ad1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 22 Sep 2008 21:50:29 +0000 Subject: 2008-09-22 Joel Sherrill * Makefile.am, configure.ac, include/bspopts.h.in: 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. --- c/src/lib/libbsp/m68k/mcf5329/ChangeLog | 9 ++++++ c/src/lib/libbsp/m68k/mcf5329/Makefile.am | 4 +-- c/src/lib/libbsp/m68k/mcf5329/configure.ac | 9 ++++++ c/src/lib/libbsp/m68k/mcf5329/include/bspopts.h.in | 7 +++++ c/src/lib/libbsp/m68k/mcf5329/startup/bspclean.c | 33 ---------------------- 5 files changed, 27 insertions(+), 35 deletions(-) delete mode 100644 c/src/lib/libbsp/m68k/mcf5329/startup/bspclean.c (limited to 'c/src/lib/libbsp/m68k/mcf5329') diff --git a/c/src/lib/libbsp/m68k/mcf5329/ChangeLog b/c/src/lib/libbsp/m68k/mcf5329/ChangeLog index a0319c1c94..1fe53afb59 100644 --- a/c/src/lib/libbsp/m68k/mcf5329/ChangeLog +++ b/c/src/lib/libbsp/m68k/mcf5329/ChangeLog @@ -1,3 +1,12 @@ +2008-09-22 Joel Sherrill + + * Makefile.am, configure.ac, include/bspopts.h.in: 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 * include/bsp.h: Remove unnecessary boilerplate comments. diff --git a/c/src/lib/libbsp/m68k/mcf5329/Makefile.am b/c/src/lib/libbsp/m68k/mcf5329/Makefile.am index ff9c049943..16552c3f72 100644 --- a/c/src/lib/libbsp/m68k/mcf5329/Makefile.am +++ b/c/src/lib/libbsp/m68k/mcf5329/Makefile.am @@ -25,8 +25,8 @@ project_lib_DATA = start.$(OBJEXT) dist_project_lib_DATA += startup/linkcmds startup/linkcmdsflash -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/init5329.c startup/bspstart.c startup/cfinit.c\ ../../shared/bootcard.c \ diff --git a/c/src/lib/libbsp/m68k/mcf5329/configure.ac b/c/src/lib/libbsp/m68k/mcf5329/configure.ac index 9d689e9bc9..543eb6d638 100644 --- a/c/src/lib/libbsp/m68k/mcf5329/configure.ac +++ b/c/src/lib/libbsp/m68k/mcf5329/configure.ac @@ -20,6 +20,15 @@ RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION 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/mcf5329/include/bspopts.h.in b/c/src/lib/libbsp/m68k/mcf5329/include/bspopts.h.in index a8a4bcbb38..cb52a8c5d0 100644 --- a/c/src/lib/libbsp/m68k/mcf5329/include/bspopts.h.in +++ b/c/src/lib/libbsp/m68k/mcf5329/include/bspopts.h.in @@ -8,6 +8,13 @@ starts set to zero. */ #undef BSP_DIRTY_MEMORY +/* If defined, print a message and wait until pressed before resetting board + when application exits. */ +#undef BSP_PRESS_KEY_FOR_RESET + +/* If defined, reset the board when the application exits. */ +#undef BSP_RESET_BOARD_AT_EXIT + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT diff --git a/c/src/lib/libbsp/m68k/mcf5329/startup/bspclean.c b/c/src/lib/libbsp/m68k/mcf5329/startup/bspclean.c deleted file mode 100644 index 0a51e87e49..0000000000 --- a/c/src/lib/libbsp/m68k/mcf5329/startup/bspclean.c +++ /dev/null @@ -1,33 +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 -#include -#include - -void bsp_cleanup(void) -{ - printk("\nRTEMS exited!\n"); - for (;;) { - asm volatile (" nop "); - asm volatile (" nop "); - } -} -- cgit v1.2.3