2001-05-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* scitab/.cvsignore: Add.
	* configure.in: Add --enable-console, CPU_CLOCK_RATE_HZ, autoheader
	bspopt.h.
	* include/bsp.h: Complete rewrite based on the AMOS-BSP.
	* README: Update.
	* bsp_specs: copy from gensh1
This commit is contained in:
Joel Sherrill
2001-05-09 13:12:23 +00:00
parent ba91ea3d66
commit f0ef873cca
6 changed files with 156 additions and 38 deletions

View File

@@ -1,3 +1,12 @@
2001-05-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* scitab/.cvsignore: Add.
* configure.in: Add --enable-console, CPU_CLOCK_RATE_HZ, autoheader
bspopt.h.
* include/bsp.h: Complete rewrite based on the AMOS-BSP.
* README: Update.
* bsp_specs: copy from gensh1
2001-01-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Add scitab, gdbsci to SUBDIRS.

View File

@@ -23,8 +23,8 @@ simulator better use gdb versions > 5.0.
* gdb's simulator is not able to correctly emulate memory areas esp. shadowing
and non-consecutive memory. I.e. access to memory areas besides area 0 will
(bogusly) generate SIGBUS exceptions. This includes access to area 5
(On-chip peripherials) and prevents simulation of configuration of
accesses to on-chip peripherials.
(On-chip peripherials) and prevents simulation of configuration and access
to on-chip peripherials.
* Due to limitations of the simulator you will only be able to run
applications which do not try to access any SH control registers.
@@ -32,5 +32,15 @@ applications which do not try to access any SH control registers.
Currently, this excludes all applications, which apply timers and serial
devices, i.e. almost any real world application.
* The simulator currently uses gdb's trap34 interface for console I/O. This
could be replaced with polled sci1 I/O for SHes > SH1.
* This BSP supports 3 different console devices (cf. configure --help):
- trap34, an interface base on gdb's trap34 emulation. Known to work with
gdb-5.0.
- gdbsci1, a stripped down sci device driver adapted to apply gdb's sci1
emulation. This is known to fail with gdb-5.0, because of a bug in gdb-5.0's
sh-sim, a patch is submitted, but .. ~==
- devnull, redirection of console io to /dev/null. Try to single step this,
if you want to understand the details on how SH-RTEMS console redirection
works.
NOTE: the trap34 interface is incomplete and is temporarily disabled
inside of configure.in.

View File

@@ -8,16 +8,15 @@
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group \
%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
-lc -lgcc --end-group \
%{!qnolinkcmds: -T linkcmds%s}}
%{!qrtems: %(old_lib)} \
%{qrtems: --start-group %{!qrtems_debug: -lrtemsall } %{qrtems_debug: -lrtemsall_g} \
-lc -lgcc --end-group \
%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: \
%{!qrtems_debug: start.o%s} \
%{qrtems_debug: start_g.o%s}}
%{!qrtems: %(old_startfile)} \
%{qrtems: %{qrtems_debug: start_g.o%s} %{!qrtems_debug: start.o%s}}
*link:
%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
%(old_link) %{qrtems: -dc -dp -N -e _start}

View File

@@ -19,6 +19,58 @@ RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)
RTEMS_CANONICAL_HOST
RTEMS_BSP_ARG_ENABLE([console],
[ --enable-console=[[null|gdbsci1]]],[
case $enable_console in
null)
BSP_CONSOLE_DEVNAME=\"/dev/null\"
BSP_CONSOLE_DRIVER_TABLE_ENTRY=DEVNULL_DRIVER_TABLE_ENTRY
;;
# Not yet
# trap34)
# BSP_CONSOLE_DEVNAME=\"/dev/trap34\"
# BSP_CONSOLE_DRIVER_TABLE_ENTRY=DEVTRAP34_DRIVER_TABLE_ENTRY
# ;;
yes|gdbsci1)
BSP_CONSOLE_DEVNAME=\"/dev/gdbsci1\"
BSP_CONSOLE_DRIVER_TABLE_ENTRY=DEVGDBSCI_DRIVER_TABLE_ENTRY
;;
*) AC_MSG_WARN([bad value $enable_console for --enable-console=<value>])
;;
esac],[
BSP_CONSOLE_DEVNAME=\"/dev/gdbsci1\"
BSP_CONSOLE_DRIVER_TABLE_ENTRY=DEVGDBSCI_DRIVER_TABLE_ENTRY
])
AC_DEFINE_UNQUOTED(
[BSP_CONSOLE_DEVNAME],
[${BSP_CONSOLE_DEVNAME}],
[device name to redirect the console to])
AC_DEFINE_UNQUOTED(
[BSP_CONSOLE_DRIVER_TABLE_ENTRY],
[${BSP_CONSOLE_DRIVER_TABLE_ENTRY}],
[Driver table entry for the console device])
##
RTEMS_BSP_ARG_ENABLE([iomem-patch],
[ --enable-iomem-patch=[[yes|no]]])
if test x"$enable_iomem_patch" = x"yes"; then
AC_DEFINE_UNQUOTED(
[HAVE_SHSIM_IOMEM_PATCH],
[1],
[whether support for functional IOMEM in shsim/gdb shall be enabled])
fi
## setup environment variable
CPU_CLOCK_RATE_HZ=${CPU_CLOCK_RATE_HZ-20000000}
AC_SUBST(CPU_CLOCK_RATE_HZ)
## Propagate option to config header
AC_DEFINE_UNQUOTED(
[CPU_CLOCK_RATE_HZ],
[$CPU_CLOCK_RATE_HZ],
[cpu clock rate in HZ])
AM_CONFIG_HEADER(include/bspopts.h)
RTEMS_PROJECT_ROOT
# Explicitly list all Makefiles here
@@ -27,6 +79,8 @@ Makefile
clock/Makefile
console/Makefile
include/Makefile
scitab/Makefile
gdbsci/Makefile
start/Makefile
startup/Makefile
wrapup/Makefile)

View File

@@ -1,9 +1,17 @@
/* bsp.h
/*
* This include file contains all board IO definitions.
*
* This include file contains some definitions specific to the
* JMR3904 simulator in gdb.
* SH-gdb simulator BSP
*
* COPYRIGHT (c) 1989-2000.
* Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
*
* COPYRIGHT (c) 2001, Ralf Corsepius, Ulm, Germany
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* COPYRIGHT (c) 2001.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -13,17 +21,33 @@
* $Id$
*/
#ifndef __JMR3904_h
#define __JMR3904_h
#ifndef __bsp_h
#define __bsp_h
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems.h>
#include <iosupp.h>
#include <console.h>
#include <clockdrv.h>
#include <console.h>
/*
* confdefs.h overrides for this BSP:
* - number of termios serial ports (defaults to 1)
* - Interrupt stack space is not minimum if defined.
*/
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 0
#define CONFIGURE_INTERRUPT_STACK_MEMORY (4 * 1024)
#include <bspopts.h>
/*
* FIXME: One of these would be enough.
*/
#include <gdbsci.h>
#include <rtems/devnull.h>
/*
* Define the time limits for RTEMS Test Suite test durations.
@@ -31,52 +55,72 @@ extern "C" {
* values are in seconds and need to be converted to ticks for the
* application.
*
* FIXME: This should not be here.
*/
#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */
#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */
/*
* Define the interrupt mechanism for Time Test 27
*
* NOTE: Following are for XXX and are board independent
* Stuff for Time Test 27
*
* FIXME: This should not be here.
*/
#define MUST_WAIT_FOR_INTERRUPT 0
#define Install_tm27_vector( handler )
#define Cause_tm27_intr()
#define Clear_tm27_intr()
#define Lower_tm27_intr()
/* Constants */
/*
* Simple spin delay in microsecond units for device drivers.
* This is very dependent on the clock speed of the target.
*
* FIXME: Not applicable with gdb's simulator
* Kept for sourcecode compatibility with other sh-BSPs
*/
#define delay( microseconds ) CPU_delay(microseconds)
#define sh_delay( microseconds ) CPU_delay(microseconds)
/*
* Defined in the linker script 'linkcmds'
*/
extern unsigned32 HeapStart ;
extern unsigned32 HeapEnd ;
extern unsigned32 WorkSpaceStart ;
extern unsigned32 WorkSpaceEnd ;
extern void *CPU_Interrupt_stack_low ;
extern void *CPU_Interrupt_stack_high ;
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
extern void bsp_cleanup( void );
/*
* Device Driver Table Entries
*/
/*
* NOTE: Use the standard Console driver entry
* Redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console
*/
#undef CONSOLE_DRIVER_TABLE_ENTRY
#define CONSOLE_DRIVER_TABLE_ENTRY \
BSP_CONSOLE_DRIVER_TABLE_ENTRY, \
{ console_initialize, console_open, console_close, \
console_read, console_write, console_control }
/*
* NOTE: Use the standard Clock driver entry
*/
/* functions */
void bsp_cleanup( void );
/* i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int ); */
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in