source: rtems/c/src/lib/libbsp/sh/gensh1/include/bsp.h @ 21bfd93

4.104.114.84.95
Last change on this file since 21bfd93 was 21bfd93, checked in by Joel Sherrill <joel.sherrill@…>, on 09/29/98 at 12:40:33

Patch from Ralf Corsepius <corsepiu@…>:

Please find enclosed a patch which enables me to build the bare-bsp for
sh-rtems.

Changes:

  1. Add preinstall to libbsp/bare/include/Makefile.in
  2. Removed FORCEIT, add preinstall to libbsp/sh/gensh1/include/Makefile.in
  3. Disabled support of set_vector from sh code (shared/setvec.c is still present but isn't used anymore), set_vector replaced with standard rtems functions.

Problems still present:

  1. Support of spin-delays in bare bsp
  2. Proper support of cpu frequency

To configure I used:

<srcdir>/configure \
--target=sh-rtems \
--prefix=<instdir>/sh-bare \
--enable-bare-cpu-model=sh7032 \
--enable-bare-cpu-cflags='-Wall -m1 -DMHZ=20
-DCPU_CONSOLE_DEVNAME="\"/dev/null\""'
--enable-rtemsbsp=bare \
--disable-networking \
--disable-cxx \
--disable-posix \
--disable-tests

IMO, if there are no objections to this patch, a similar approach should
be applied to all CPUs/BSPs (esp. hppa1.1, mips64orion, ppc403, because
they apply set_vector inside of libcpu).

  • Property mode set to 100644
File size: 2.8 KB
Line 
1/*
2 *  This include file contains all board IO definitions.
3 *
4 *  generic sh1
5 *
6 *  Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
7 *
8 *  COPYRIGHT (c) 1997-1998, FAW 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 *
15 *  COPYRIGHT (c) 1998.
16 *  On-Line Applications Research Corporation (OAR).
17 *  Copyright assigned to U.S. Government, 1994.
18 *
19 *  The license and distribution terms for this file may be
20 *  found in the file LICENSE in this distribution or at
21 *  http://www.OARcorp.com/rtems/license.html.
22 *
23 *  $Id$
24 */
25
26#ifndef __gensh1_h
27#define __gensh1_h
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#define CPU_CONSOLE_DEVNAME "/dev/null"
34
35
36#include <rtems.h>
37#include <clockdrv.h>
38#include <sh/null.h>
39#include <console.h>
40
41/*
42 *  Define the time limits for RTEMS Test Suite test durations.
43 *  Long test and short test duration limits are provided.  These
44 *  values are in seconds and need to be converted to ticks for the
45 *  application.
46 *
47 */
48
49#define MAX_LONG_TEST_DURATION       300 /* 5 minutes = 300 seconds */
50#define MAX_SHORT_TEST_DURATION      3   /* 3 seconds */
51
52/*
53 *  Stuff for Time Test 27
54 */
55
56#define MUST_WAIT_FOR_INTERRUPT 0
57
58#define Install_tm27_vector( handler ) \
59{ \
60  rtems_isr_entry ignored ; \
61  rtems_interrupt_catch( (handler), 0, &ignored ) ; \
62}
63
64#define Cause_tm27_intr()
65
66#define Clear_tm27_intr()
67
68#define Lower_tm27_intr()
69
70/* Constants */
71
72#define MHZ 20
73
74/*
75 * Defined in the linker script 'linkcmds'
76 */
77
78extern unsigned32       HeapStart ;
79extern unsigned32       HeapEnd ;
80extern unsigned32       WorkSpaceStart ;
81extern unsigned32       WorkSpaceEnd ;
82
83extern void *CPU_Interrupt_stack_low ;
84extern void *CPU_Interrupt_stack_high ;
85
86 
87/* miscellaneous stuff assumed to exist */
88
89extern rtems_configuration_table BSP_Configuration;
90
91extern void bsp_cleanup( void );
92
93/*
94 *  Device Driver Table Entries
95 */
96
97/*
98 * We redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console
99 */
100#if defined(CONSOLE_DRIVER_TABLE_ENTRY)
101#warning Overwriting CONSOLE_DRIVER_TABLE_ENTRY
102#undef CONSOLE_DRIVER_TABLE_ENTRY
103#endif
104
105#define CONSOLE_DRIVER_TABLE_ENTRY \
106  DEVNULL_DRIVER_TABLE_ENTRY, \
107  { console_initialize, console_open, console_close, \
108      console_read, console_write, console_control }
109 
110/*
111 * NOTE: Use the standard Clock driver entry
112 */
113
114/*
115 * FIXME: Should this go to libcpu/sh/sh7032 ?
116 */
117#if 0
118/* functions */
119sh_isr_entry set_vector(                    /* returns old vector */
120  rtems_isr_entry     handler,                  /* isr routine        */
121  rtems_vector_number vector,                   /* vector number      */
122  int                 type                      /* RTEMS or RAW intr  */
123);
124#endif
125
126#ifdef __cplusplus
127}
128#endif
129
130#endif
131/* end of include file */
Note: See TracBrowser for help on using the repository browser.