forked from Imagelibrary/rtems
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, console/uart.c, startup/bspstart.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/uart.c, startup/bspstart.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-21 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2008-09-21 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* include/bsp.h: Remove define of BSP_ZERO_WORKSPACE_AUTOMATICALLY.
|
* include/bsp.h: Remove define of BSP_ZERO_WORKSPACE_AUTOMATICALLY.
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ dist_project_lib_DATA += startup/linkcmds
|
|||||||
include_HEADERS += ../../arm/shared/comm/uart.h
|
include_HEADERS += ../../arm/shared/comm/uart.h
|
||||||
startup_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
|
startup_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||||
../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
|
../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
|
||||||
../../shared/bspgetworkarea.c startup/bspstart.c startup/bspclean.c \
|
../../shared/bspgetworkarea.c startup/bspstart.c \
|
||||||
|
../../shared/bspclean.c startup/bspreset.c \
|
||||||
../../shared/bootcard.c ../../shared/sbrk.c \
|
../../shared/bootcard.c ../../shared/sbrk.c \
|
||||||
../../shared/gnatinstallhandler.c
|
../../shared/gnatinstallhandler.c
|
||||||
console_SOURCES = ../../shared/console.c
|
console_SOURCES = ../../shared/console.c
|
||||||
|
|||||||
@@ -18,6 +18,15 @@ RTEMS_PROG_CCAS
|
|||||||
RTEMS_CHECK_NETWORKING
|
RTEMS_CHECK_NETWORKING
|
||||||
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
|
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
|
RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
|
||||||
|
|
||||||
# Explicitly list all Makefiles here
|
# Explicitly list all Makefiles here
|
||||||
|
|||||||
@@ -288,7 +288,12 @@ static void _BSP_put_char( char c ) {
|
|||||||
|
|
||||||
BSP_output_char_function_type BSP_output_char = _BSP_put_char;
|
BSP_output_char_function_type BSP_output_char = _BSP_put_char;
|
||||||
|
|
||||||
|
static int _BSP_get_char(void)
|
||||||
|
{
|
||||||
|
return uart_poll_read(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
BSP_polling_getchar_function_type BSP_poll_char = _BSP_get_char;
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
/*
|
|
||||||
* Philips LPC22XX/LPC21xx BSP Shutdown code
|
|
||||||
* Copyright (c) 2007 by Ray Xu <rayx.cn@gmail.com>
|
|
||||||
*
|
|
||||||
* 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 <rtems/bspIo.h>
|
|
||||||
#include <rtems/libio.h>
|
|
||||||
|
|
||||||
int uart_poll_read(int);
|
|
||||||
|
|
||||||
void rtemsReboot (void)
|
|
||||||
{
|
|
||||||
#ifdef __thumb__
|
|
||||||
int tmp;
|
|
||||||
asm volatile (" .code 16 \n" \
|
|
||||||
"ldr %[tmp], =_start \n" \
|
|
||||||
"bx %[tmp] \n" \
|
|
||||||
"nop \n" \
|
|
||||||
: [tmp]"=&r" (tmp) );
|
|
||||||
#else
|
|
||||||
asm volatile ("b _start");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void bsp_cleanup(void)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* AT this point, the console driver is disconnected => we must
|
|
||||||
* use polled output/input. This is exactly what printk
|
|
||||||
* does.
|
|
||||||
*/
|
|
||||||
printk("\nEXECUTIVE SHUTDOWN! Any key to reboot...");
|
|
||||||
while (uart_poll_read(0) < 0) continue;
|
|
||||||
|
|
||||||
/* rtemsReboot(); */
|
|
||||||
}
|
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
* Function prototypes
|
* Function prototypes
|
||||||
*/
|
*/
|
||||||
extern void rtems_irq_mngt_init(void);
|
extern void rtems_irq_mngt_init(void);
|
||||||
void bsp_libc_init( void *, uint32_t, int );
|
|
||||||
extern void UART0_Ini(void);
|
extern void UART0_Ini(void);
|
||||||
extern void printi(unsigned long);
|
extern void printi(unsigned long);
|
||||||
|
|
||||||
@@ -99,22 +98,6 @@ void bsp_start_default( void )
|
|||||||
rtems_irq_mngt_init();
|
rtems_irq_mngt_init();
|
||||||
} /* bsp_start */
|
} /* bsp_start */
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reset the system.
|
|
||||||
*
|
|
||||||
* This functions enables the watchdog and waits for it to
|
|
||||||
* fire, thus resetting the system.
|
|
||||||
*/
|
|
||||||
void bsp_reset(void)
|
|
||||||
{
|
|
||||||
rtems_interrupt_level level;
|
|
||||||
|
|
||||||
rtems_interrupt_disable(level);
|
|
||||||
|
|
||||||
while(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* By making this a weak alias for bsp_start_default, a brave soul
|
* By making this a weak alias for bsp_start_default, a brave soul
|
||||||
* can override the actual bsp_start routine used.
|
* can override the actual bsp_start routine used.
|
||||||
|
|||||||
Reference in New Issue
Block a user