Ticket #247: pr247.diff

File pr247.diff, 2.7 KB (added by Ralf Corsepius, on 12/03/06 at 13:31:13)

pr247.diff

  • ChangeLog

    RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/h8300/h8sim/ChangeLog,v
    retrieving revision 1.24
    diff -u -r1.24 ChangeLog
     
     12002-08-05      Joel Sherrill <joel@OARcorp.com>
     2
     3        * startup/bspstart.c, startup/linkcmds: Per PR247 , fix the linkcmds
     4        to avoid overlapping sections and reworked the way the heap and
     5        workspace are calculated.
     6
    172002-07-21      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    28
    39        * start/Makefile.am: Eliminate PGM.
  • startup/bspstart.c

    RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c,v
    retrieving revision 1.3
    diff -u -r1.3 bspstart.c
     
    5656 
    5757void bsp_pretasking_hook(void)
    5858{
    59     extern int HeapBase;
    60     extern int HeapSize;
    61     void         *heapStart = &HeapBase;
    62     unsigned long heapSize = (unsigned long)&HeapSize;
     59    void         *heapStart;
     60    unsigned long heapSize;
    6361    unsigned long ramSpace;
     62    extern int WorkspaceBase;
    6463
     64    heapStart =  (void *)
     65       ((unsigned long)&WorkspaceBase + BSP_Configuration.work_space_size);
     66    if ( (unsigned long) heapStart > (256 * 1024) )
     67       rtems_fatal_error_occurred (('H'<<24) | ('E'<<16) | ('A'<<8) | 'P');
     68    heapSize = (256 * 1024) - (unsigned long)(heapStart);
    6569    bsp_libc_init(heapStart, heapSize, 0);
    6670
    6771#ifdef RTEMS_DEBUG
     
    7882
    7983void bsp_start( void )
    8084{
    81   extern int _end;
    8285  extern int WorkspaceBase;
    8386  /* Configure Number of Register Caches */
    8487
  • startup/linkcmds

    RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/h8300/h8sim/startup/linkcmds,v
    retrieving revision 1.2
    diff -u -r1.2 linkcmds
     
    5353
    5454         _etext = .;
    5555    }  >ram
    56    .tors : {
     56   .tors SIZEOF(.text) + ADDR(.text): {
    5757        ___ctors = . ;
    5858        *(.ctors)
    5959        ___ctors_end = . ;
     
    6161        *(.dtors)
    6262        ___dtors_end = . ;
    6363    }  >ram
    64     .data SIZEOF(.text) + ADDR(.text):
     64    .data SIZEOF(.tors) + ADDR(.tors):
    6565    {
    6666        *(.data)
     67        *(.gcc_exc*)
    6768        CONSTRUCTORS
    6869         _edata = .;
    6970    }  >ram
     
    7778        _stack_init = .;
    7879        _clear_end = .;
    7980        _WorkspaceBase = .;
    80         . += 64K;       /* reserve some memory for workspace */
    81         _HeapBase = .;
    82         . += _HeapSize; /* reserve some memory for heap */
    8381         _end = .;
    8482         __end = .;
    8583    } >ram