Changeset d04bf28e in rtems


Ignore:
Timestamp:
May 20, 2008, 10:13:16 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
1b2dd278
Parents:
5768e61
Message:

2008-05-20 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac, startup/start.c: Use new framework capability where RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION.
Location:
c/src/lib/libbsp/arm/nds
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/nds/ChangeLog

    r5768e61 rd04bf28e  
     12008-05-20      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * Makefile.am, configure.ac, startup/start.c: Use new framework
     4        capability where RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION.
     5
    162008-04-18      Joel Sherrill <joel.sherrill@OARcorp.com>
    27
  • c/src/lib/libbsp/arm/nds/Makefile.am

    r5768e61 rd04bf28e  
    3434startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
    3535    startup/start.c ../../shared/bsppredriverhook.c \
    36     ../../shared/bootcard.c ../../shared/sbrk.c \
    37     ../../shared/gnatinstallhandler.c
     36    ../../shared/bsppretaskinghook.c ../../shared/bootcard.c
    3837startup_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
    3938startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
     39
     40noinst_PROGRAMS += gnatsupp.rel
     41gnatsupp_rel_SOURCES = ../../shared/gnatinstallhandler.c
     42gnatsupp_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
     43gnatsupp_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
    4044
    4145noinst_PROGRAMS += clock.rel
     
    252256noinst_LIBRARIES = libbsp.a
    253257libbsp_a_SOURCES =
    254 libbsp_a_LIBADD = clock.rel console.rel startup.rel irq.rel timer.rel libnds9.rel rtc.rel fb.rel touchscreen.rel sound.rel block.rel libdldi.rel
    255 if HAS_NETWORKING
    256 libbsp_a_LIBADD += wifi.rel dswifi9.rel
     258libbsp_a_LIBADD = clock.rel console.rel gnatsupp.rel startup.rel irq.rel \
     259    timer.rel libnds9.rel rtc.rel fb.rel touchscreen.rel sound.rel \
     260    block.rel libdldi.rel
     261
     262if HAS_NETWORKING
     263    libbsp_a_LIBADD += wifi.rel dswifi9.rel
    257264endif
    258265
  • c/src/lib/libbsp/arm/nds/configure.ac

    r5768e61 rd04bf28e  
    2020AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
    2121
     22RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
     23
    2224RTEMS_CONFIG_BUILD_SUBDIRS(tools)
    2325
  • c/src/lib/libbsp/arm/nds/startup/start.c

    r5768e61 rd04bf28e  
    1616
    1717/*
    18  * ld linker symbols.
    19  */
    20 
    21 extern uint8_t __bss_start;
    22 extern uint8_t __bss_end;
    23 extern uint8_t _end;
    24 extern uint8_t __ewram_end;
    25 
    26 /*
    27  * address of start of free memory - should be updated after creating new
    28  * partitions or regions.
    29  */
    30 
    31 static uint32_t heap_start;
    32 
    33 /*
    34  * other bsp init functions.
    35  */
    36 
    37 extern void bsp_libc_init (void *, uint32_t, int);
    38 
    39 /*
    4018 * This definition comes from ARM cpu code.
    4119 */
    42 
    4320extern unsigned int arm_cpu_mode;
    4421
    4522/*
    46  * setup libc.
     23 *  This method returns the base address and size of the area which
     24 *  is to be allocated between the RTEMS Workspace and the C Program
     25 *  Heap.
    4726 */
     27void bsp_get_workarea(
     28  void   **workarea_base,
     29  size_t  *workarea_size,
     30  size_t  *requested_heap_size
     31)
     32{
     33  extern uint8_t _end;
     34  extern uint8_t __ewram_end;
    4835
    49 void
    50 bsp_pretasking_hook (void)
    51 {
    52   uint32_t heap_size;
    53 
    54   printk ("[+] initializing heap\n");
    55 
    56   /* initialize heap with all remaining memory */
    57   heap_size = (uint32_t) & __ewram_end - heap_start;
    58   bsp_libc_init ((void *) heap_start, heap_size, 0);
     36  *workarea_base       = &_end;
     37  *workarea_size       = (void *)&__ewram_end - (void *)&_end;
     38  *requested_heap_size = 0;
    5939}
    6040
     
    6646bsp_start (void)
    6747{
    68   Configuration.work_space_start = &_end;
    69 
    7048  /* initialize irq management */
    7149  BSP_rtems_irq_mngt_init ();
     
    9068  /* configure clock period */
    9169  Configuration.microseconds_per_tick = 10000;  /* us */
    92 
    93   /* check memory space for rtems workspace */
    94   heap_start =
    95     Configuration.work_space_start +
    96     rtems_configuration_get_work_space_size ();
    97   if (heap_start > &__ewram_end) {
    98     printk ("[!] memory exhausted\n");
    99     bsp_cleanup ();
    100   }
    10170}
    10271
     
    10877bss_reset (void)
    10978{
     79  extern uint8_t __bss_start;
     80  extern uint8_t __bss_end;
     81
    11082  memset (&__bss_start, 0, (uint32_t) & __bss_end - (uint32_t) & __bss_start);
    11183}
Note: See TracChangeset for help on using the changeset viewer.