Changeset ff32644e in rtems for c/src/lib/libbsp/h8300


Ignore:
Timestamp:
Sep 14, 2008, 9:02:10 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 5, master
Children:
25e4d24
Parents:
a012d18
Message:

2008-09-14 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac, startup/main.c, startup/bspstart.c: Split out bsp_get_work_area() into its own file and user BSP Framework to perform more initialization.
  • startup/bspgetworkarea.c: New file.
Location:
c/src/lib/libbsp/h8300/h8sim
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/h8300/h8sim/ChangeLog

    ra012d18 rff32644e  
     12008-09-14      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, configure.ac, startup/__main.c, startup/bspstart.c:
     4        Split out bsp_get_work_area() into its own file and user BSP
     5        Framework to perform more initialization.
     6        * startup/bspgetworkarea.c: New file.
     7
    182008-09-10      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • c/src/lib/libbsp/h8300/h8sim/Makefile.am

    ra012d18 rff32644e  
    2727
    2828startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
    29     ../../shared/bsppredriverhook.c \
    30     ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
    31     ../../shared/sbrk.c ../../shared/gnatinstallhandler.c startup/__main.c
     29    ../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
     30    startup/bspgetworkarea.c ../../shared/bsppost.c startup/bspstart.c \
     31    ../../shared/bootcard.c ../../shared/sbrk.c \
     32    ../../shared/gnatinstallhandler.c startup/__main.c
    3233clock_SOURCES = ../../shared/clock_driver_stub.c
    3334console_SOURCES = ../../shared/console-polled.c console/console-io.c
  • c/src/lib/libbsp/h8300/h8sim/configure.ac

    ra012d18 rff32644e  
    1616RTEMS_PROG_CCAS
    1717
     18RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
     19
    1820# Explicitly list all Makefiles here
    1921AC_CONFIG_FILES([Makefile])
  • c/src/lib/libbsp/h8300/h8sim/startup/__main.c

    ra012d18 rff32644e  
    55 */
    66
     7typedef void (*pfunc) (void);
     8extern pfunc __ctors[];
     9extern pfunc __ctors_end[];
     10
    711void __main (void)
    812{
    913  static int initialized;
    10   if (! initialized)
    11     {
    12       typedef void (*pfunc) (void);
    13       extern pfunc __ctors[];
    14       extern pfunc __ctors_end[];
    15       pfunc *p;
     14  pfunc *p;
    1615
    17       initialized = 1;
    18       for (p = __ctors_end; p > __ctors; )
    19         (*--p) ();
     16  if (initialized)
     17    return;
    2018
    21     }
     19  initialized = 1;
     20  for (p = __ctors_end; p > __ctors; )
     21    (*--p) ();
     22
    2223}
  • c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c

    ra012d18 rff32644e  
    2222
    2323/*
    24  *  Use the shared implementations of the following routines
    25  */
    26 
    27 void bsp_libc_init( void *, uint32_t, int );
    28 
    29 /*
    30  *  Function:   bsp_pretasking_hook
    31  *  Created:    95/03/10
    32  *
    33  *  Description:
    34  *      BSP pretasking hook.  Called just before drivers are initialized.
    35  *      Used to setup libc and install any BSP extensions.
    36  *
    37  *  NOTES:
    38  *      Must not use libc (to do io) from here, since drivers are
    39  *      not yet initialized.
    40  *
    41  */
    42 
    43 void bsp_pretasking_hook(void)
    44 {
    45     void         *heapStart;
    46     unsigned long heapSize;
    47     extern int WorkspaceBase;
    48 
    49     heapStart =  (void *)
    50        ((unsigned long)&WorkspaceBase + rtems_configuration_get_work_space_size());
    51     if ( (unsigned long) heapStart > (256 * 1024) )
    52        rtems_fatal_error_occurred (('H'<<24) | ('E'<<16) | ('A'<<8) | 'P');
    53     heapSize = (256 * 1024) - (unsigned long)(heapStart);
    54     bsp_libc_init(heapStart, heapSize, 0);
    55 }
    56 
    57 /*
    5824 *  bsp_start
    5925 *
     
    6329void bsp_start( void )
    6430{
    65   extern int WorkspaceBase;
    66 
    67 /*
    68   if ( rtems_configuration_get_work_space_size() >(512*1024) )
    69    _sys_exit( 1 );
    70 */
    71 
    72   Configuration.work_space_start = (void *) &WorkspaceBase;
    7331}
    7432
Note: See TracChangeset for help on using the changeset viewer.