forked from Imagelibrary/rtems
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, console/console.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.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-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* startup/bspstart.c: Remove unnecessary includes of
|
||||
|
||||
@@ -39,8 +39,8 @@ gbaoverrides_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
startup_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||
startup/bspgetworkarea.c ../../shared/bsppretaskinghook.c \
|
||||
../../shared/bsppredriverhook.c startup/bspclean.c \
|
||||
../../shared/bootcard.c ../../shared/sbrk.c \
|
||||
../../shared/bsppredriverhook.c ../../shared/bspclean.c \
|
||||
startup/bspreset.c ../../shared/bootcard.c ../../shared/sbrk.c \
|
||||
../../shared/gnatinstallhandler.c
|
||||
clock_SOURCES = clock/clockdrv.c
|
||||
console_SOURCES = console/conio.c console/console.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
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
#include <gba.h>
|
||||
#include <conio.h>
|
||||
|
||||
extern void rtemsReboot(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief gba_pollRead function read char
|
||||
*
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/**
|
||||
* @file exit.c
|
||||
*
|
||||
* Routines to shutdown and reboot the BSP.
|
||||
*/
|
||||
/*
|
||||
* RTEMS GBA BSP
|
||||
*
|
||||
* Copyright (c) 2004 Markku Puro <markku.puro@kopteri.net>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <bsp.h>
|
||||
#include <rtems/bspIo.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <gba.h>
|
||||
|
||||
|
||||
/**
|
||||
* @brief rtemsReboot BSP routine reboot rtems
|
||||
*
|
||||
* Input parameters: None
|
||||
*
|
||||
* Output parameters: None
|
||||
*/
|
||||
void rtemsReboot (void)
|
||||
{
|
||||
asm volatile ("ldr r0, =_gba_reset");
|
||||
asm volatile ("bx r0");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief bsp_cleanup BSP routine wait input from user for rebooting
|
||||
*
|
||||
* Normally at this point, the console driver is disconnected => we must
|
||||
* use polled output/input. This is exactly what printk does.
|
||||
*
|
||||
* @param None
|
||||
* @return None
|
||||
*/
|
||||
void bsp_cleanup(void)
|
||||
{
|
||||
static const char line[]="\nEXECUTIVE SHUTDOWN! Press button to reboot...";
|
||||
printk("\n");
|
||||
printk("%s",line);
|
||||
while ( !GBA_ANY_KEY(GBA_KEY_ALL) );
|
||||
rtemsReboot();
|
||||
}
|
||||
Reference in New Issue
Block a user