/************************************************************************** * * Filename: * * xgcmon.ld * * Description: * * This is the linker script file for use with the Temic TSC695E starter * kit board, and using the XGC monitor. Use this script file for * building application programs that will run under the monitor. * * Revision: * * $Id: xgcmon.ld,v 1.4 2000/12/03 18:39:08 cvs Exp $ * **************************************************************************/ STARTUP(crt1.o) /* * Set _STACK_SIZE to the size in bytes of the main stack. The main stack * is used by the main subprogram and any other subprograms it calls. The * minimum size is the size of one frame plus the size of one interrupt * frame, i.e. 396 bytes. Add 104 bytes plus local data for each frame. * Note: you may use the stack check option to catch any stack overflows. */ _STACK_SIZE = 64K; /* * Set _PROM_SIZE to the size of the boot PROM. If you have no boot PROM * then use the value zero. Permissable sizes are: 128K, 256K, 512K, 1M, * 2M, 4M, 8M and 16M. Be sure to initialize the MEC memory configuration * register with the same size. */ _PROM_SIZE = 512K; /* * Set _RAM_SIZE to the size of the RAM. Permissable values are 256K, 512K, * 1MB, 2Mb, 4Mb, 8Mb, 16Mb, and 32Mb. Be sure to initialize the MEC memory * configuration register with the same size. */ _RAM_SIZE = 2M; /* * Set _RAM_START to the address of the first location in RAM. For the * ERC32 chipset using the Temic MEC, this address is always 0x02000000. */ _RAM_START = 0x02000000; /* * Set _RAM_START to the address of the first location in RAM. For the * ERC32 chipset using the Temic MEC, this address is always 0x02000000. */ _PROM_START = 0x00000000; /* * This is the default memory layout. You may change this as necessary by * editing the SECTIONS statements that follow: * * +--------------------+ * 0x02000000 | .text | * | _stext | * | *(.text) | program instructions * | etext | * | _endtext | * +--------------------+ * | .rodata | * | _srodata | * | *(.rodata) | read only data sections * | ctor list | constructors * | dtor list | destructors * | _erodata | * | .idata | * | _sidata | * | *(.data) | data sections initial values * | -eidata | * +--------------------+ * / / * / / * +--------------------+ * 0x21000000 | .data | * | _sdata | * | *(.data) | initialized data sections * | _edata | * +--------------------+ * | .bss | * | __bss_start | start of bss, cleared by crt0 * | *(.bss) | unitialized data sections * +--------------------+ * | _end | start of heap, used by sbrk() * | _sheap | * | heap space | * / / * / / * | _eheap | * +--------------------+ * | main stack | * | _sstack | * | (64K) | * | | * | _estack | * +--------------------+ * 0x023e8000 | interrupt stack | * | _sistack | * | (64K) | * | | * 0x021efff8 | _eistack | * +--------------------+ * 0x021f8000 | xgc mon code | * | data and stack | * | (32K) | * +--------------------+ * 0x02200000 */ _RAM_END = _RAM_START + _RAM_SIZE; /* * Start and end of main stack */ _sistack = _RAM_END - 32K - 64K; _estack = _sistack - 8; _sstack = _sistack - _STACK_SIZE; /* * End of heap */ _eheap = _sstack - 8; SECTIONS { .text 0x02000000 : { _stext = .; *(.init) *(.fini) *(.text) _etext = .; } .rodata : { . = ALIGN(8); _srodata = .; *(.rodata) . = ALIGN(4); __CTOR_LIST__ = .; LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) *(.ctors) LONG(0) __CTOR_END__ = .; __DTOR_LIST__ = .; LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) *(.dtors) LONG(0) __DTOR_END__ = .; _erodata = .; _sidata = .; } .data 0x02100000 : AT (_sidata) { . = ALIGN(8); _sdata = .; *(.data) _edata = .; } .bss : { . = ALIGN(8); __bss_start = .; *(.bss) *(COMMON) _end = .; _sheap = .; } .stab 0 (NOLOAD) : { [ .stab ] } .stabstr 0 (NOLOAD) : { [ .stabstr ] } }