Changeset 21bfd93 in rtems for c/src/lib


Ignore:
Timestamp:
09/29/98 12:40:33 (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
f1ccfde
Parents:
766ed7c
Message:

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).

Location:
c/src/lib
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/bare/include/Makefile.in

    r766ed7c r21bfd93  
    2929CLOBBER_ADDITIONS +=
    3030
    31 all:    $(SRCS)
    32         $(INSTALL) -m 444 $(H_FILES) $(PROJECT_INCLUDE)
    33         $(INSTALL) -m 444 $(EQ_FILES) $(PROJECT_INCLUDE)
     31all:    preinstall
     32
     33preinstall: $(SRCS)
     34        @INSTALL@ $(INSTINCFLAGS) $(H_FILES) $(PROJECT_INCLUDE)
  • c/src/lib/libbsp/sh/gensh1/include/Makefile.in

    r766ed7c r21bfd93  
    3131CLOBBER_ADDITIONS +=
    3232
    33 all:    $(SRCS)
    34         $(INSTALL) -m 444 $(H_FILES) $(PROJECT_INCLUDE)
    35         $(INSTALL) -m 444 $(EQ_FILES) $(PROJECT_INCLUDE)
     33all:    preinstall
    3634
    37 install: all
     35preinstall: $(SRCS)
     36        @INSTALL@ $(INSTINCFLAGS) $(H_FILES) $(PROJECT_INCLUDE)
  • c/src/lib/libbsp/sh/gensh1/include/bsp.h

    r766ed7c r21bfd93  
    5656#define MUST_WAIT_FOR_INTERRUPT 0
    5757
    58 #define Install_tm27_vector( handler ) set_vector( (handler), 0, 1 )
     58#define Install_tm27_vector( handler ) \
     59{ \
     60  rtems_isr_entry ignored ; \
     61  rtems_interrupt_catch( (handler), 0, &ignored ) ; \
     62}
    5963
    6064#define Cause_tm27_intr()
     
    111115 * FIXME: Should this go to libcpu/sh/sh7032 ?
    112116 */
     117#if 0
    113118/* functions */
    114119sh_isr_entry set_vector(                    /* returns old vector */
     
    117122  int                 type                      /* RTEMS or RAW intr  */
    118123);
     124#endif
    119125
    120126#ifdef __cplusplus
  • c/src/lib/libbsp/sh/gensh1/startup/Makefile.in

    r766ed7c r21bfd93  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bsplibc bsppost bspstart bspclean sbrk setvec main
     14C_PIECES=bsplibc bsppost bspstart bspclean sbrk main
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/sh/shared/setvec.c

    r766ed7c r21bfd93  
    11/*  set_vector
     2 *
     3 *  NOTE: This function is considered OBSOLETE and may vanish soon.
     4 *      Calls to set_vector should be replaced by calls to
     5 *      rtems_interrupt_catch or _CPU_ISR_install_raw_handler.
    26 *
    37 *  This routine installs an interrupt vector on the target Board/CPU.
     
    5357  return previous_isr;
    5458}
    55 
  • c/src/lib/libcpu/sh/sh7032/clock/ckinit.c

    r766ed7c r21bfd93  
    153153
    154154  if ( BSP_Configuration.ticks_per_timeslice ) {
    155     Old_ticker = (rtems_isr_entry) set_vector( Clock_isr, CLOCK_VECTOR, 1 );
     155    rtems_interrupt_catch( Clock_isr, CLOCK_VECTOR, &Old_ticker );
    156156    /*
    157157     *  Hardware specific initialize goes here
     
    281281      else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
    282282        {
     283          rtems_isr_entry       ignored ;
    283284          rtems_interrupt_disable( isrlevel );
    284           (void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
     285          rtems_interrupt_catch( args->buffer, CLOCK_VECTOR, &ignored );
     286         
    285287          rtems_interrupt_enable( isrlevel );
    286288        }
  • c/src/lib/libcpu/sh/sh7032/include/Makefile.in

    r766ed7c r21bfd93  
    2727        test -d $(PROJECT_INCLUDE)/sh || $(MKDIR) $(PROJECT_INCLUDE)/sh
    2828        $(INSTALL) -m 444 $(H_FILES) $(PROJECT_INCLUDE)/sh
    29 
    30 all: FORCEIT
    31         cd ../../../../libbsp/$(RTEMS_CPU)/$(RTEMS_BSP)/include; $(MAKE) all
  • c/src/lib/libcpu/sh/sh7032/timer/timer.c

    r766ed7c r21bfd93  
    6363void Timer_initialize( void )
    6464{
    65   rtems_unsigned8 temp8;
     65  rtems_unsigned8  temp8;
    6666  rtems_unsigned16 temp16;
    6767  rtems_unsigned32 level;
    68   rtems_isr* ignored;
     68  rtems_isr        *ignored;
    6969
    7070  /*
     
    118118
    119119  /* initialize ISR */
    120   ignored = set_vector( timerisr, ITU1_VECTOR, 0);
     120  _CPU_ISR_install_raw_handler( ITU1_VECTOR, timerisr, &ignored );
    121121  _CPU_ISR_Enable( level);
    122122
Note: See TracChangeset for help on using the changeset viewer.