Changeset f86582c8 in rtems


Ignore:
Timestamp:
May 11, 2001, 4:51:25 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
baf22b9
Parents:
5dbd4fe
Message:

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

  • configure.in: Use RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]), adapt bspopts.h handling to other sh-BSPs.
  • include/.cvsignore: Add stamp-h*, bspopts.h*.
  • include/Makefile.am: Use include_HEADERS instead of H_FILES.
  • startup/bspstart.c: Reworked, based on the amos BSP.
Location:
c/src/lib/libbsp/sh/shsim
Files:
5 edited

Legend:

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

    r5dbd4fe rf86582c8  
     12001-05-10      Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
     2
     3        * configure.in: Use RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]), adapt
     4        bspopts.h handling to other sh-BSPs.
     5        * include/.cvsignore: Add stamp-h*, bspopts.h*.
     6        * include/Makefile.am: Use include_HEADERS instead of H_FILES.
     7        * startup/bspstart.c: Reworked, based on the amos BSP.
     8
    192001-05-09      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    210
  • c/src/lib/libbsp/sh/shsim/configure.in

    r5dbd4fe rf86582c8  
    1212AM_MAINTAINER_MODE
    1313
    14 RTEMS_PROG_CC_FOR_TARGET
     14RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
    1515RTEMS_CANONICALIZE_TOOLS
    1616
     
    6161fi
    6262
    63 ## setup environment variable
     63## bsp-specific options
    6464CPU_CLOCK_RATE_HZ=${CPU_CLOCK_RATE_HZ-20000000}
    6565AC_SUBST(CPU_CLOCK_RATE_HZ)
    66 ## Propagate option to config header
    6766AC_DEFINE_UNQUOTED(
    6867  [CPU_CLOCK_RATE_HZ],
     
    7069  [cpu clock rate in HZ])
    7170
     71## Used in scitab/Makefile.am
     72AC_SUBST(CPU_CLOCK_RATE_HZ)
     73
    7274AM_CONFIG_HEADER(include/bspopts.h)
    73 
    7475RTEMS_PROJECT_ROOT
    7576
  • c/src/lib/libbsp/sh/shsim/include/Makefile.am

    r5dbd4fe rf86582c8  
    55AUTOMAKE_OPTIONS = foreign 1.4
    66
    7 H_FILES = bsp.h gdbsci.h ../../../shared/include/coverhd.h
     7include_HEADERS = bsp.h gdbsci.h coverhd.h bspopts.h
     8
     9coverhd.h: $(top_srcdir)/../../shared/include/coverhd.h
     10        cp $< $@
     11
     12CLEANFILES += coverhd.h
    813
    914$(PROJECT_INCLUDE):
    1015        $(mkinstalldirs) $@
    1116
    12 $(PROJECT_INCLUDE)/bsp.h: bsp.h
     17$(PROJECT_INCLUDE)/%.h: %.h
    1318        $(INSTALL_DATA) $< $@
    1419
    15 $(PROJECT_INCLUDE)/bspopts.h: bspopts.h
    16         $(INSTALL_DATA) $< $@
    17 
    18 $(PROJECT_INCLUDE)/sh/gdbsci.h: gdbsci.h
    19         $(INSTALL_DATA) $< $@
    20 
    21 $(PROJECT_INCLUDE)/coverhd.h: ../../../shared/include/coverhd.h
    22         $(INSTALL_DATA) $< $@
    23 
    24 TMPINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/bsp.h \
    25     $(PROJECT_INCLUDE)/coverhd.h $(PROJECT_INCLUDE)/sh/gdbsci.h \
    26     $(PROJECT_INCLUDE)/bspopts.h
     20PREINSTALL_FILES += $(PROJECT_INCLUDE) \
     21    $(include_HEADERS:%=$(PROJECT_INCLUDE)/%)
    2722
    2823all-local: $(TMPINSTALL_FILES)
    2924
    30 EXTRA_DIST = bsp.h
    31 
    3225include $(top_srcdir)/../../../../../../automake/local.am
  • c/src/lib/libbsp/sh/shsim/startup/Makefile.am

    r5dbd4fe rf86582c8  
    55AUTOMAKE_OPTIONS = foreign 1.4
    66
    7 VPATH = @srcdir@:@srcdir@/../../../shared
     7VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared
    88
    99PGM = $(ARCH)/startup.rel
    1010
    11 C_FILES = bspclean.c bsplibc.c bsppost.c bspstart.c bootcard.c main.c sbrk.c \
     11C_FILES = bsplibc.c bsppost.c bspstart.c bspclean.c sbrk.c bootcard.c main.c \
    1212    gnatinstallhandler.c
    1313C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
     
    3636.PRECIOUS: $(PGM)
    3737
    38 EXTRA_DIST = bspclean.c bspstart.c exit.c linkcmds setvec.c
     38EXTRA_DIST = bspstart.c linkcmds
    3939
    4040include $(top_srcdir)/../../../../../../automake/local.am
  • c/src/lib/libbsp/sh/shsim/startup/bspstart.c

    r5dbd4fe rf86582c8  
    55 *  before this routine is invoked.
    66 *
    7  *  COPYRIGHT (c) 1989-2000.
     7 *  COPYRIGHT (c) 2001.
     8 *  Ralf Corsepius (corsepiu@faw.uni-ulm.de).
     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.
    815 *  On-Line Applications Research Corporation (OAR).
    916 *
     
    4350/*
    4451 *  Function:   bsp_pretasking_hook
    45  *  Created:    95/03/10
    4652 *
    4753 *  Description:
     
    5763void bsp_pretasking_hook(void)
    5864{
    59     extern int HeapBase;
    60     extern int HeapSize;
    61     void         *heapStart = &HeapBase;
    62     unsigned long heapSize = (unsigned long)&HeapSize;
    63     unsigned long ramSpace;
    64 
    65     bsp_libc_init(heapStart, (unsigned32) heapSize, 0);
    66 
     65    bsp_libc_init(&HeapStart, sizeof(unsigned32) * (&HeapEnd - &HeapStart), 0);
     66 
    6767#ifdef RTEMS_DEBUG
    6868    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
    6969#endif
     70}
    7071
    71 }
    72  
    7372/*
    7473 *  bsp_start
     
    7978void bsp_start( void )
    8079{
    81   extern int _end;
    82   extern int WorkspaceBase;
    83   /* Configure Number of Register Caches */
     80  /*
     81     For real boards you need to setup the hardware
     82     and need to copy the vector table from rom to ram.
     83
     84     Depending on the board this can either be done from inside the rom
     85     startup code, rtems startup code or here.
     86   */
     87   
     88  /*
     89   *  Allocate the memory for the RTEMS Work Space.  This can come from
     90   *  a variety of places: hard coded address, malloc'ed from outside
     91   *  RTEMS world (e.g. simulator or primitive memory manager), or (as
     92   *  typically done by stock BSPs) by subtracting the required amount
     93   *  of work space from the last physical address on the CPU board.
     94   */
     95
     96  /*
     97   *  Need to "allocate" the memory for the RTEMS Workspace and
     98   *  tell the RTEMS configuration where it is.  This memory is
     99   *  not malloc'ed.  It is just "pulled from the air".
     100   */
     101
     102  BSP_Configuration.work_space_start = (void *) &WorkSpaceStart ;
     103  BSP_Configuration.work_space_size  =
     104    (unsigned32) &WorkSpaceEnd -
     105    (unsigned32) &WorkSpaceStart ;
     106 
     107  /*
     108   *  initialize the CPU table for this BSP
     109   */
     110
     111#if ( CPU_ALLOCATE_INTERRUPT_STACK == FALSE )
     112  _CPU_Interrupt_stack_low = &CPU_Interrupt_stack_low ;
     113  _CPU_Interrupt_stack_high = &CPU_Interrupt_stack_high ;
     114
     115  Cpu_table.interrupt_stack_size =
     116    (unsigned32) (&CPU_Interrupt_stack_high) -
     117    (unsigned32) (&CPU_Interrupt_stack_low) ;
     118#endif
     119
    84120
    85121  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    86122  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    87   Cpu_table.interrupt_stack_size = 4096;
    88 
    89   if ( BSP_Configuration.work_space_size >(512*1024) )
    90    _sys_exit( 1 );
    91 
    92   BSP_Configuration.work_space_start = (void *) &WorkspaceBase;
     123 
     124#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
     125  Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
     126#endif
     127  Cpu_table.clicks_per_second = CPU_CLOCK_RATE_HZ ;
    93128}
    94 
    95 /* XXX */
    96 void clear_cache( void *address, size_t n )
    97 {
    98 }
    99 
    100 /* Structure filled in by get_mem_info.  Only the size field is
    101    actually used (to clear bss), so the others aren't even filled in.  */
    102 
    103 struct s_mem
    104 {
    105   unsigned int size;
    106   unsigned int icsize;
    107   unsigned int dcsize;
    108 };
    109 
    110 
    111 void
    112 get_mem_info (mem)
    113      struct s_mem *mem;
    114 {
    115   mem->size = 0x1000000;        /* XXX figure out something here */
    116 }
    117 
Note: See TracChangeset for help on using the changeset viewer.