2008-09-23 Joel Sherrill <joel.sherrill@oarcorp.com>

* Makefile.am, configure.ac, include/bsp.h, startup/bspstart.c: Rename
	existing bsp_reset() to bsp_sysReset() since the prototype did not
	match the standard one. Add standard bsp_reset().
	* startup/bspreset.c: New file.
This commit is contained in:
Joel Sherrill
2008-09-23 15:28:23 +00:00
parent dba0264924
commit 3e2f58a17c
6 changed files with 40 additions and 5 deletions

View File

@@ -1,3 +1,10 @@
2008-09-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, include/bsp.h, startup/bspstart.c: Rename
existing bsp_reset() to bsp_sysReset() since the prototype did not
match the standard one. Add standard bsp_reset().
* startup/bspreset.c: New file.
2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/bsp.h: Remove unnecessary boilerplate comments.

View File

@@ -25,7 +25,7 @@ project_lib_DATA = start.$(OBJEXT)
dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c startup/bspreset.c \
../../shared/bsppost.c ../../shared/bsppredriverhook.c \
../../shared/bsppretaskinghook.c ../../shared/bspgetworkarea.c \
startup/init5282.c startup/bspstart.c ../../shared/bootcard.c \

View File

@@ -19,6 +19,15 @@ RTEMS_CHECK_NETWORKING
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
RTEMS_BSPOPTS_SET([BSP_PRESS_KEY_FOR_RESET],[*],[0])
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

View File

@@ -64,7 +64,7 @@ typedef struct {
uint32_t bsp_get_CPU_clock_speed(void);
rtems_status_code bsp_allocate_interrupt(int level, int priority);
int bsp_reset(int flags);
int bsp_sysReset(int flags);
int bsp_program(bsp_mnode_t *chain, int flags);
unsigned const char *bsp_gethwaddr(int a);
const char *bsp_getbenv(const char *a);

View File

@@ -0,0 +1,19 @@
/*
* COPYRIGHT (c) 1989-2008.
* 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 <bsp.h>
#include <bsp/bootcard.h>
void bsp_reset(void)
{
bsp_sysReset(0);
}

View File

@@ -183,7 +183,7 @@ static void handler(int pc)
static volatile int reent;
rtems_interrupt_disable(level);
if (reent++) bsp_reset(0);
if (reent++) bsp_sysReset(0);
{
int *p = &pc;
int info = p[-1];
@@ -363,14 +363,14 @@ type bsp_##name(d1type d1, d2type d2, d3type d3) \
syscall_return(type,ret); \
}
#define SysCode_reset 0 /* reset */
#define SysCode_sysReset 0 /* system reset */
#define SysCode_program 5 /* program flash memory */
#define SysCode_gethwaddr 12 /* get hardware address */
#define SysCode_getbenv 14 /* get bootloader environment variable */
#define SysCode_setbenv 15 /* set bootloader environment variable */
#define SysCode_flash_erase_range 19 /* erase a section of flash */
#define SysCode_flash_write_range 20 /* write a section of flash */
syscall_1(int, reset, int, flags)
syscall_1(int, sysReset, int, flags)
syscall_1(unsigned const char *, gethwaddr, int, a)
syscall_1(const char *, getbenv, const char *, a)
syscall_1(int, setbenv, const char *, a)