forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -82,6 +82,11 @@ void csb250_output_char(char c)
|
||||
}
|
||||
}
|
||||
|
||||
BSP_output_char_function_type BSP_output_char = csb250_output_char;
|
||||
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
||||
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 = csb250_get_char;
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user