/*
|
/*
|
* This is the linker directive file to link an application to run
|
* This is the linker directive file to link an application to run
|
* under mon960 on the CY board with a Cx, Jx, or Hx processor.
|
* under mon960 on the CY board with a Cx, Jx, or Hx processor.
|
* Programs linked with this file are downloaded to DRAM after the
|
* Programs linked with this file are downloaded to DRAM after the
|
* data area used by mon960.
|
* data area used by mon960.
|
* malloc() uses the symbols _heap_base and _heap_end to manage the heap.
|
* malloc() uses the symbols _heap_base and _heap_end to manage the heap.
|
* _heap_base is located at the end of program memory (.text + .data +.bss).
|
* _heap_base is located at the end of program memory (.text + .data +.bss).
|
* _heap_size is defined as 0x20000.
|
* _heap_size is defined as 0x20000.
|
* The C runtime stack starts at _heap_end and grows up.
|
* The C runtime stack starts at _heap_end and grows up.
|
* There must be enough room after the program memory in the dram for
|
* There must be enough room after the program memory in the dram for
|
* the program's heap and stack.
|
* the program's heap and stack.
|
*/
|
*/
|
|
|
MEMORY
|
MEMORY
|
{
|
{
|
dram : org = 0xA3C08000, len = 0x1ff8000 /* 4M less monitor */
|
dram : org = 0xA3C08000, len = 0x1ff8000 /* 4M less monitor */
|
isram : org = 0x00000100, len = 0x300
|
isram : org = 0x00000100, len = 0x300
|
}
|
}
|
|
|
|
|
SECTIONS
|
SECTIONS
|
{
|
{
|
.text :
|
.text :
|
{
|
{
|
} >dram
|
} >dram
|
|
|
.data :
|
.data :
|
{
|
{
|
} >dram
|
} >dram
|
|
|
.bss :
|
.bss :
|
{
|
{
|
} >dram
|
} >dram
|
|
|
|
|
/* For R4.0 of the compiler & libraries, the following lines */
|
/* For R4.0 of the compiler & libraries, the following lines */
|
/* should not be enclosed in comments. */
|
/* should not be enclosed in comments. */
|
/*
|
/*
|
SFP_AC :
|
SFP_AC :
|
{
|
{
|
fpem_CA_AC = .;
|
fpem_CA_AC = .;
|
} >isram
|
} >isram
|
*/
|
*/
|
}
|
}
|
|
|
/* Bounds of heap: */
|
/* Bounds of heap: */
|
/* The heap may be placed in a separate memory region, if desired. */
|
/* The heap may be placed in a separate memory region, if desired. */
|
|
|
/* _stackbase marks the base of the kernel's initial stack. We put it way at
|
/* _stackbase marks the base of the kernel's initial stack. We put it way at
|
* the top of memory. */
|
* the top of memory. */
|
__stext = __Btext;
|
__stext = __Btext;
|
__etext = __Etext;
|
__etext = __Etext;
|
__sdata = __Bdata;
|
__sdata = __Bdata;
|
__edata = __Edata;
|
__edata = __Edata;
|
__end = _end;
|
__end = _end;
|
_stackbase = 0xa3ff0000;
|
_stackbase = 0xa3ff0000;
|
|
|
ENTRY(_main)
|
ENTRY(_main)
|
/* Don't use low-level libs anymore */
|
/* Don't use low-level libs anymore */
|
/*
|
/*
|
STARTUP ("crt960*")
|
STARTUP ("crt960*")
|
HLL ()
|
HLL ()
|
SYSLIB ("libmn*")
|
SYSLIB ("libmn*")
|
SYSLIB ("libll*")
|
SYSLIB ("libll*")
|
*/
|
*/
|
FLOAT
|
FLOAT
|
|
|