mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2002-08-05 Joel Sherrill <joel@OARcorp.com>
* startup/bspstart.c, startup/linkcmds: Per PR247 , fix the linkcmds to avoid overlapping sections and reworked the way the heap and workspace are calculated.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2002-08-05 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* startup/bspstart.c, startup/linkcmds: Per PR247 , fix the linkcmds
|
||||||
|
to avoid overlapping sections and reworked the way the heap and
|
||||||
|
workspace are calculated.
|
||||||
|
|
||||||
2002-07-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2002-07-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* start/Makefile.am: Eliminate PGM.
|
* start/Makefile.am: Eliminate PGM.
|
||||||
|
|||||||
@@ -56,12 +56,16 @@ void bsp_libc_init( void *, unsigned32, int );
|
|||||||
|
|
||||||
void bsp_pretasking_hook(void)
|
void bsp_pretasking_hook(void)
|
||||||
{
|
{
|
||||||
extern int HeapBase;
|
void *heapStart;
|
||||||
extern int HeapSize;
|
unsigned long heapSize;
|
||||||
void *heapStart = &HeapBase;
|
|
||||||
unsigned long heapSize = (unsigned long)&HeapSize;
|
|
||||||
unsigned long ramSpace;
|
unsigned long ramSpace;
|
||||||
|
extern int WorkspaceBase;
|
||||||
|
|
||||||
|
heapStart = (void *)
|
||||||
|
((unsigned long)&WorkspaceBase + BSP_Configuration.work_space_size);
|
||||||
|
if ( (unsigned long) heapStart > (256 * 1024) )
|
||||||
|
rtems_fatal_error_occurred (('H'<<24) | ('E'<<16) | ('A'<<8) | 'P');
|
||||||
|
heapSize = (256 * 1024) - (unsigned long)(heapStart);
|
||||||
bsp_libc_init(heapStart, heapSize, 0);
|
bsp_libc_init(heapStart, heapSize, 0);
|
||||||
|
|
||||||
#ifdef RTEMS_DEBUG
|
#ifdef RTEMS_DEBUG
|
||||||
@@ -78,7 +82,6 @@ void bsp_pretasking_hook(void)
|
|||||||
|
|
||||||
void bsp_start( void )
|
void bsp_start( void )
|
||||||
{
|
{
|
||||||
extern int _end;
|
|
||||||
extern int WorkspaceBase;
|
extern int WorkspaceBase;
|
||||||
/* Configure Number of Register Caches */
|
/* Configure Number of Register Caches */
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ SECTIONS
|
|||||||
|
|
||||||
_etext = .;
|
_etext = .;
|
||||||
} >ram
|
} >ram
|
||||||
.tors : {
|
.tors SIZEOF(.text) + ADDR(.text): {
|
||||||
___ctors = . ;
|
___ctors = . ;
|
||||||
*(.ctors)
|
*(.ctors)
|
||||||
___ctors_end = . ;
|
___ctors_end = . ;
|
||||||
@@ -61,9 +61,10 @@ SECTIONS
|
|||||||
*(.dtors)
|
*(.dtors)
|
||||||
___dtors_end = . ;
|
___dtors_end = . ;
|
||||||
} >ram
|
} >ram
|
||||||
.data SIZEOF(.text) + ADDR(.text):
|
.data SIZEOF(.tors) + ADDR(.tors):
|
||||||
{
|
{
|
||||||
*(.data)
|
*(.data)
|
||||||
|
*(.gcc_exc*)
|
||||||
CONSTRUCTORS
|
CONSTRUCTORS
|
||||||
_edata = .;
|
_edata = .;
|
||||||
} >ram
|
} >ram
|
||||||
@@ -77,9 +78,6 @@ SECTIONS
|
|||||||
_stack_init = .;
|
_stack_init = .;
|
||||||
_clear_end = .;
|
_clear_end = .;
|
||||||
_WorkspaceBase = .;
|
_WorkspaceBase = .;
|
||||||
. += 64K; /* reserve some memory for workspace */
|
|
||||||
_HeapBase = .;
|
|
||||||
. += _HeapSize; /* reserve some memory for heap */
|
|
||||||
_end = .;
|
_end = .;
|
||||||
__end = .;
|
__end = .;
|
||||||
} >ram
|
} >ram
|
||||||
|
|||||||
Reference in New Issue
Block a user