forked from Imagelibrary/rtems
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, console/uart.c, startup/bspclean.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/bspreset.c: New file.
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
2008-09-22 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, configure.ac, console/uart.c, startup/bspclean.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/bspreset.c: New file.
|
||||
|
||||
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, startup/linkcmds: Use top level shared
|
||||
|
||||
@@ -27,9 +27,9 @@ dist_project_lib_DATA += startup/linkcmds
|
||||
|
||||
startup_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||
../../shared/bspgetworkarea.c ../../shared/bsppretaskinghook.c \
|
||||
../../shared/bsppredriverhook.c startup/bspstart.c startup/bspclean.c \
|
||||
startup/memmap.c ../../shared/bootcard.c ../../shared/sbrk.c \
|
||||
../../shared/gnatinstallhandler.c
|
||||
../../shared/bsppredriverhook.c startup/bspstart.c ../../shared/bspclean.c \
|
||||
startup/bspreset.c startup/memmap.c ../../shared/bootcard.c \
|
||||
../../shared/sbrk.c ../../shared/gnatinstallhandler.c
|
||||
console_SOURCES = console/uart.c
|
||||
abort_SOURCES = ../shared/abort/abort.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
|
||||
|
||||
@@ -442,13 +442,14 @@ void _BSP_output_char(char c)
|
||||
poll_write('\r');
|
||||
}
|
||||
}
|
||||
BSP_output_char_function_type BSP_output_char = _BSP_output_char;
|
||||
|
||||
BSP_output_char_function_type BSP_output_char = _BSP_output_char;
|
||||
|
||||
char _BSP_poll_char()
|
||||
{
|
||||
return poll_read();
|
||||
}
|
||||
|
||||
BSP_polling_getchar_function_type BSP_poll_char = _BSP_poll_char;
|
||||
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
*
|
||||
* 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 <stdio.h>
|
||||
#include <bsp.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
25
c/src/lib/libbsp/arm/csb336/startup/bspreset.c
Normal file
25
c/src/lib/libbsp/arm/csb336/startup/bspreset.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Cogent CSB336 Shutdown code
|
||||
*
|
||||
* Copyright (c) 2004 by Cogent Computer Systems
|
||||
* Written by Jay Monkman <jtm@lopingdog.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>
|
||||
|
||||
void bsp_reset(void)
|
||||
{
|
||||
rtems_interrupt_level level;
|
||||
|
||||
rtems_interrupt_disable(level);
|
||||
|
||||
printk("\n\rI should reset here.\n\r");
|
||||
while(1);
|
||||
}
|
||||
@@ -126,18 +126,3 @@ int get_perclk1_freq(void)
|
||||
*/
|
||||
void bsp_start (void) __attribute__ ((weak, alias("bsp_start_default")));
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
_CPU_ISR_Disable(level);
|
||||
|
||||
printk("\n\rI should reset here.\n\r");
|
||||
while(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user