source: rtems/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c @ 47a3cd8

4.115
Last change on this file since 47a3cd8 was 47a3cd8, checked in by Sebastian Huber <sebastian.huber@…>, on 08/09/12 at 14:48:00

score: Work area initialization API change

The work areas (RTEMS work space and C program heap) will be initialized
now in a separate step and are no longer part of
rtems_initialize_data_structures(). Initialization is performed with
tables of Heap_Area entries. This allows usage of scattered memory
areas present on various small scale micro-controllers.

The sbrk() support API changes also. The bsp_sbrk_init() must now deal
with a minimum size for the first memory chunk to take the configured
work space size into account.

  • Property mode set to 100644
File size: 487 bytes
Line 
1/*
2 *  The license and distribution terms for this file may be
3 *  found in the file LICENSE in this distribution or at
4 *  http://www.rtems.com/license/LICENSE.
5 */
6
7#include <bsp.h>
8#include <bsp/bootcard.h>
9#include <stdint.h>
10
11extern  void _end;
12extern  void __heap_limit;
13
14void bsp_work_area_initialize(void)
15{
16  void *area_start = (void *)&_end;
17  uintptr_t area_size  = (uintptr_t)&__heap_limit - (uintptr_t)&_end;
18
19  bsp_work_area_initialize_default( area_start, area_size );
20}
21
Note: See TracBrowser for help on using the repository browser.