Changeset f0ef873 in rtems


Ignore:
Timestamp:
May 9, 2001, 1:12:23 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
d85594d
Parents:
ba91ea3
Message:

2001-05-09 Ralf Corsepius <corsepiu@…>

  • 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
Location:
c/src/lib/libbsp/sh/shsim
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sh/shsim/ChangeLog

    rba91ea3 rf0ef873  
     12001-05-09      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
     2
     3        * scitab/.cvsignore: Add.
     4        * configure.in: Add --enable-console, CPU_CLOCK_RATE_HZ, autoheader
     5        bspopt.h.
     6        * include/bsp.h: Complete rewrite based on the AMOS-BSP.
     7        * README: Update.
     8        * bsp_specs: copy from gensh1
     9
    1102001-01-29      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    211
  • c/src/lib/libbsp/sh/shsim/README

    rba91ea3 rf0ef873  
    2424and non-consecutive memory. I.e. access to memory areas besides area 0 will
    2525(bogusly) generate SIGBUS exceptions.  This includes access to area 5
    26 (On-chip peripherials) and prevents simulation of configuration of
    27 accesses to on-chip peripherials.
     26(On-chip peripherials) and prevents simulation of configuration and access
     27to on-chip peripherials.
    2828
    2929* Due to limitations of the simulator you will only be able to run
     
    3333devices, i.e. almost any real world application.
    3434
    35 * The simulator currently uses gdb's trap34 interface for console I/O. This
    36 could be replaced with polled sci1 I/O for SHes > SH1.
     35* This BSP supports 3 different console devices (cf. configure --help):
     36- trap34, an interface base on gdb's trap34 emulation. Known to work with
     37  gdb-5.0.
     38- gdbsci1, a stripped down sci device driver adapted to apply gdb's sci1
     39emulation. This is known to fail with gdb-5.0, because of a bug in gdb-5.0's
     40sh-sim, a patch is submitted, but .. ~==
     41- devnull, redirection of console io to /dev/null. Try to single step this,
     42if you want to understand the details on how SH-RTEMS console redirection
     43works.
     44
     45NOTE: the trap34 interface is incomplete and is temporarily disabled
     46inside of configure.in.
  • c/src/lib/libbsp/sh/shsim/bsp_specs

    rba91ea3 rf0ef873  
    99
    1010*lib:
    11 %{!qrtems: %(old_lib)} %{qrtems: --start-group \
    12 %{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
    13 -lc -lgcc --end-group \
    14 %{!qnolinkcmds: -T linkcmds%s}}
     11%{!qrtems: %(old_lib)} \
     12%{qrtems: --start-group %{!qrtems_debug: -lrtemsall } %{qrtems_debug: -lrtemsall_g} \
     13 -lc -lgcc --end-group \
     14 %{!qnolinkcmds: -T linkcmds%s}}
    1515
    1616*startfile:
    17 %{!qrtems: %(old_startfile)} %{qrtems: \
    18 %{!qrtems_debug: start.o%s} \
    19 %{qrtems_debug: start_g.o%s}}
     17%{!qrtems: %(old_startfile)} \
     18%{qrtems: %{qrtems_debug: start_g.o%s} %{!qrtems_debug: start.o%s}}
    2019
    2120*link:
    22 %(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
     21%(old_link) %{qrtems: -dc -dp -N -e _start}
    2322
  • c/src/lib/libbsp/sh/shsim/configure.in

    rba91ea3 rf0ef873  
    2020RTEMS_CANONICAL_HOST
    2121
     22RTEMS_BSP_ARG_ENABLE([console],
     23[  --enable-console=[[null|gdbsci1]]],[
     24  case $enable_console in
     25  null)
     26    BSP_CONSOLE_DEVNAME=\"/dev/null\"
     27    BSP_CONSOLE_DRIVER_TABLE_ENTRY=DEVNULL_DRIVER_TABLE_ENTRY
     28    ;;
     29# Not yet
     30#  trap34)
     31#    BSP_CONSOLE_DEVNAME=\"/dev/trap34\"
     32#    BSP_CONSOLE_DRIVER_TABLE_ENTRY=DEVTRAP34_DRIVER_TABLE_ENTRY
     33#    ;;
     34  yes|gdbsci1)
     35    BSP_CONSOLE_DEVNAME=\"/dev/gdbsci1\"
     36    BSP_CONSOLE_DRIVER_TABLE_ENTRY=DEVGDBSCI_DRIVER_TABLE_ENTRY
     37    ;;
     38  *) AC_MSG_WARN([bad value $enable_console for --enable-console=<value>])
     39    ;;
     40  esac],[
     41    BSP_CONSOLE_DEVNAME=\"/dev/gdbsci1\"
     42    BSP_CONSOLE_DRIVER_TABLE_ENTRY=DEVGDBSCI_DRIVER_TABLE_ENTRY
     43])
     44AC_DEFINE_UNQUOTED(
     45  [BSP_CONSOLE_DEVNAME],
     46  [${BSP_CONSOLE_DEVNAME}],
     47  [device name to redirect the console to])
     48AC_DEFINE_UNQUOTED(
     49  [BSP_CONSOLE_DRIVER_TABLE_ENTRY],
     50  [${BSP_CONSOLE_DRIVER_TABLE_ENTRY}],
     51  [Driver table entry for the console device])
     52
     53##
     54RTEMS_BSP_ARG_ENABLE([iomem-patch],
     55[  --enable-iomem-patch=[[yes|no]]])
     56if test x"$enable_iomem_patch" = x"yes"; then
     57AC_DEFINE_UNQUOTED(
     58  [HAVE_SHSIM_IOMEM_PATCH],
     59  [1],
     60  [whether support for functional IOMEM in shsim/gdb shall be enabled])
     61fi
     62
     63## setup environment variable
     64CPU_CLOCK_RATE_HZ=${CPU_CLOCK_RATE_HZ-20000000}
     65AC_SUBST(CPU_CLOCK_RATE_HZ)
     66## Propagate option to config header
     67AC_DEFINE_UNQUOTED(
     68  [CPU_CLOCK_RATE_HZ],
     69  [$CPU_CLOCK_RATE_HZ],
     70  [cpu clock rate in HZ])
     71
     72AM_CONFIG_HEADER(include/bspopts.h)
     73
    2274RTEMS_PROJECT_ROOT
    2375
     
    2880console/Makefile
    2981include/Makefile
     82scitab/Makefile
     83gdbsci/Makefile
    3084start/Makefile
    3185startup/Makefile
  • c/src/lib/libbsp/sh/shsim/include/bsp.h

    rba91ea3 rf0ef873  
    1 /*  bsp.h
     1/*
     2 *  This include file contains all board IO definitions.
    23 *
    3  *  This include file contains some definitions specific to the
    4  *  JMR3904 simulator in gdb.
     4 *  SH-gdb simulator BSP
    55 *
    6  *  COPYRIGHT (c) 1989-2000.
     6 *  Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
     7 *
     8 *  COPYRIGHT (c) 2001, Ralf Corsepius, Ulm, Germany
     9 *
     10 *  This program is distributed in the hope that it will be useful,
     11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     13 *
     14 *  COPYRIGHT (c) 2001.
    715 *  On-Line Applications Research Corporation (OAR).
    816 *
     
    1119 *  http://www.OARcorp.com/rtems/license.html.
    1220 *
    13  *  $Id$
     21 * $Id$
    1422 */
    1523
    16 #ifndef __JMR3904_h
    17 #define __JMR3904_h
     24#ifndef __bsp_h
     25#define __bsp_h
    1826
    1927#ifdef __cplusplus
     
    2230
    2331#include <rtems.h>
    24 #include <iosupp.h>
     32#include <clockdrv.h>
    2533#include <console.h>
    26 #include <clockdrv.h>
     34
     35/*
     36 *  confdefs.h overrides for this BSP:
     37 *   - number of termios serial ports (defaults to 1)
     38 *   - Interrupt stack space is not minimum if defined.
     39 */
     40
     41#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 0
     42#define CONFIGURE_INTERRUPT_STACK_MEMORY  (4 * 1024)
     43
     44#include <bspopts.h>
     45
     46/*
     47 * FIXME: One of these would be enough.
     48 */
     49#include <gdbsci.h>
     50#include <rtems/devnull.h>
    2751
    2852/*
     
    3256 *  application.
    3357 *
     58 * FIXME: This should not be here.
    3459 */
    3560
     
    3863
    3964/*
    40  *  Define the interrupt mechanism for Time Test 27
     65 *  Stuff for Time Test 27
    4166 *
    42  *  NOTE: Following are for XXX and are board independent
    43  *
     67 * FIXME: This should not be here.
    4468 */
    4569
    4670#define MUST_WAIT_FOR_INTERRUPT 0
    4771
    48 #define Install_tm27_vector( handler )
    49 
    50 #define Cause_tm27_intr() 
    51 
    52 #define Clear_tm27_intr() 
    53 
    54 #define Lower_tm27_intr()
     72#define Install_tm27_vector( handler )
     73#define Cause_tm27_intr()
     74#define Clear_tm27_intr()
    5575
    5676/* Constants */
    5777
     78/*
     79 *  Simple spin delay in microsecond units for device drivers.
     80 *  This is very dependent on the clock speed of the target.
     81 *
     82 * FIXME: Not applicable with gdb's simulator
     83 * Kept for sourcecode compatibility with other sh-BSPs
     84 */
     85#define delay( microseconds ) CPU_delay(microseconds)
     86#define sh_delay( microseconds ) CPU_delay(microseconds)
     87
     88/*
     89 * Defined in the linker script 'linkcmds'
     90 */
     91
     92extern unsigned32       HeapStart ;
     93extern unsigned32       HeapEnd ;
     94extern unsigned32       WorkSpaceStart ;
     95extern unsigned32       WorkSpaceEnd ;
     96
     97extern void *CPU_Interrupt_stack_low ;
     98extern void *CPU_Interrupt_stack_high ;
     99
     100 
    58101/* miscellaneous stuff assumed to exist */
    59102
    60103extern rtems_configuration_table BSP_Configuration;
     104
     105extern void bsp_cleanup( void );
    61106
    62107/*
     
    65110
    66111/*
    67  * NOTE: Use the standard Console driver entry
     112 * Redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console
    68113 */
     114#undef CONSOLE_DRIVER_TABLE_ENTRY
     115#define CONSOLE_DRIVER_TABLE_ENTRY \
     116  BSP_CONSOLE_DRIVER_TABLE_ENTRY, \
     117  { console_initialize, console_open, console_close, \
     118      console_read, console_write, console_control }
    69119 
    70120/*
    71121 * NOTE: Use the standard Clock driver entry
    72122 */
    73 
    74 /* functions */
    75 
    76 void bsp_cleanup( void );
    77 
    78 /* i960_isr_entry set_vector( rtems_isr_entry, unsigned int, unsigned int ); */
    79123
    80124#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.