diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-22 21:50:06 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-22 21:50:06 +0000 |
commit | 34ea1e67d4701c3ca472b6853c18e0fe8af487ff (patch) | |
tree | f83e6a7ed18e273e7f356c3e5a86e4b6be69247a /c | |
parent | 2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-34ea1e67d4701c3ca472b6853c18e0fe8af487ff.tar.bz2 |
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, console/console-io.c: 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')
-rw-r--r-- | c/src/lib/libbsp/mips/csb350/ChangeLog | 9 | ||||
-rw-r--r-- | c/src/lib/libbsp/mips/csb350/Makefile.am | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/mips/csb350/configure.ac | 9 | ||||
-rw-r--r-- | c/src/lib/libbsp/mips/csb350/console/console-io.c | 7 | ||||
-rw-r--r-- | c/src/lib/libbsp/mips/csb350/startup/bspclean.c | 31 |
5 files changed, 26 insertions, 34 deletions
diff --git a/c/src/lib/libbsp/mips/csb350/ChangeLog b/c/src/lib/libbsp/mips/csb350/ChangeLog index c77546cc54..10bd921afc 100644 --- a/c/src/lib/libbsp/mips/csb350/ChangeLog +++ b/c/src/lib/libbsp/mips/csb350/ChangeLog @@ -1,3 +1,12 @@ +2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com> + + * Makefile.am, configure.ac, console/console-io.c: 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, include/tm27.h: Remove unnecessary boilerplate diff --git a/c/src/lib/libbsp/mips/csb350/Makefile.am b/c/src/lib/libbsp/mips/csb350/Makefile.am index 9cbfe9977e..637642b4ab 100644 --- a/c/src/lib/libbsp/mips/csb350/Makefile.am +++ b/c/src/lib/libbsp/mips/csb350/Makefile.am @@ -25,8 +25,8 @@ project_lib_DATA = start.$(OBJEXT) dist_project_lib_DATA += startup/linkcmds -startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \ - ../../shared/bsppredriverhook.c ../../shared/bsppost.c \ +startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \ + ../../shared/bsppredriverhook.c ../../shared/bsppost.c startup/bspreset.c \ ../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \ startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \ ../../shared/gnatinstallhandler.c ../../shared/setvec.c diff --git a/c/src/lib/libbsp/mips/csb350/configure.ac b/c/src/lib/libbsp/mips/csb350/configure.ac index 19c76496a3..215c5be2d5 100644 --- a/c/src/lib/libbsp/mips/csb350/configure.ac +++ b/c/src/lib/libbsp/mips/csb350/configure.ac @@ -18,6 +18,15 @@ RTEMS_PROG_CCAS RTEMS_CHECK_NETWORKING AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes") +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/mips/csb350/console/console-io.c b/c/src/lib/libbsp/mips/csb350/console/console-io.c index 6a26077ac4..f604203db2 100644 --- a/c/src/lib/libbsp/mips/csb350/console/console-io.c +++ b/c/src/lib/libbsp/mips/csb350/console/console-io.c @@ -82,6 +82,11 @@ void csb250_output_char(char c) } } +int csb250_get_char(void) +{ + return console_inbyte_nonblocking(0); +} + BSP_output_char_function_type BSP_output_char = csb250_output_char; -BSP_polling_getchar_function_type BSP_poll_char = NULL; +BSP_polling_getchar_function_type BSP_poll_char = csb250_get_char; diff --git a/c/src/lib/libbsp/mips/csb350/startup/bspclean.c b/c/src/lib/libbsp/mips/csb350/startup/bspclean.c deleted file mode 100644 index 4995a27b9e..0000000000 --- a/c/src/lib/libbsp/mips/csb350/startup/bspclean.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 <libcpu/au1x00.h> -#include <rtems/bspIo.h> - -void bsp_cleanup( void ) -{ - int console_inbyte_nonblocking(int); - void (*reset_func)(void); - - reset_func = (void *)0xbfc00000; - - mips_set_sr( 0x00200000 ); /* all interrupts off, boot exception vectors */ - - printk("\nEXECUTIVE SHUTDOWN! Any key to reboot..."); - while (console_inbyte_nonblocking(0) < 0) { - continue; - } - - /* Try to restart bootloader */ - reset_func(); -} |