From 69effbb4e16db7e6c85cd9b2bb8ad648c700b0a6 Mon Sep 17 00:00:00 2001 From: Thomas Doerfler Date: Fri, 11 Jul 2008 10:00:41 +0000 Subject: added variant to gen68360 BSP added genmcf548x BSP --- .../startup/linkcmds.m5484FireEngine.flash | 232 +++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 c/src/lib/libbsp/m68k/genmcf548x/startup/linkcmds.m5484FireEngine.flash (limited to 'c/src/lib/libbsp/m68k/genmcf548x/startup/linkcmds.m5484FireEngine.flash') diff --git a/c/src/lib/libbsp/m68k/genmcf548x/startup/linkcmds.m5484FireEngine.flash b/c/src/lib/libbsp/m68k/genmcf548x/startup/linkcmds.m5484FireEngine.flash new file mode 100644 index 0000000000..5dcb520261 --- /dev/null +++ b/c/src/lib/libbsp/m68k/genmcf548x/startup/linkcmds.m5484FireEngine.flash @@ -0,0 +1,232 @@ +/*===============================================================*\ +| Project: RTEMS generic mcf548x BSP | ++-----------------------------------------------------------------+ +| File: linkcmd.m5484FireEngine.flash | ++-----------------------------------------------------------------+ +| The file contains the linker directives for the generic MCF548x | +| BSP to be used with an m5484FireEngine EVB to load and execute | +| code in the boot FLASH. | ++-----------------------------------------------------------------+ +| Copyright (c) 2007 | +| Embedded Brains GmbH | +| Obere Lagerstr. 30 | +| D-82178 Puchheim | +| Germany | +| rtems@embedded-brains.de | ++-----------------------------------------------------------------+ +| | +| Parts of the code has been derived from the "dBUG source code" | +| package Freescale is providing for M548X EVBs. The usage of | +| the modified or unmodified code and it's integration into the | +| generic mcf548x BSP has been done according to the Freescale | +| license terms. | +| | +| The Freescale license terms can be reviewed in the file | +| | +| Freescale_license.txt | +| | ++-----------------------------------------------------------------+ +| | +| The generic mcf548x BSP has been developed on the basic | +| structures and modules of the av5282 BSP. | +| | ++-----------------------------------------------------------------+ +| | +| The license and distribution terms for this file may be | +| found in the file LICENSE in this distribution or at | +| | +| http://www.rtems.com/license/LICENSE. | +| | ++-----------------------------------------------------------------+ +| | +| date history ID | +| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +| 12.11.07 1.0 ras | +| | +\*===============================================================*/ + +/* + * Location and size of on-chip devices + */ +_SdramBase = DEFINED(_SdramBase) ? _SdramBase : 0x00000000; +_SdramSize = DEFINED(_SdramSize) ? _SdramSize : (64 * 1024 * 1024); +_SysSramBase = DEFINED(_SysSramBase) ? _SysSramBase : __MBAR + 0x00010000; +_SysSramSize = DEFINED(_SysSramSize) ? _SysSramSize : (32 * 1024); +_McdapiBase = DEFINED(_McdapiBase) ? _McdapiBase : _SysSramBase; +_McdapiSize = DEFINED(_McdapiSize) ? _McdapiSize : (12 * 1024); +_CoreSramBase0 = DEFINED(_CoreSramBase0) ? _CoreSramBase0 : 0x20000000; +_CoreSramBase1 = DEFINED(_CoreSramBase1) ? _CoreSramBase1 : 0x20001000; +_CoreSramSize0 = DEFINED(_CoreSramSize0) ? _CoreSramSize0 : (4 * 1024); +_CoreSramSize1 = DEFINED(_CoreSramSize1) ? _CoreSramSize1 : (4 * 1024); +_BootFlashBase = DEFINED(_BootFlashBase) ? _BootFlashBase : 0xFF800000; +_BootFlashSize = DEFINED(_BootFlashSize) ? _BootFlashSize : (2 * 1024 * 1024); +_CodeFlashBase = DEFINED(_CodeFlashBase) ? _CodeFlashBase : 0xE0000000; +_CodeFlashSize = DEFINED(_CodeFlashSize) ? _CodeFlashSize : (16 * 1024 * 1024); + +_VectorRam = DEFINED(_VectorRam) ? _VectorRam : _SdramBase; +_DataRam = DEFINED(_DataRam) ? _DataRam : _data_dest_start; +_DataRom = DEFINED(_DataRom) ? _DataRom : _data_src_start; +_DataEnd = DEFINED(_DataEnd) ? _DataEnd : _data_dest_end; +_BssStart = DEFINED(_BssStart) ? _BssStart : _clear_start; +_BssEnd = DEFINED(_BssEnd) ? _BssEnd : _clear_end; +_SpInit = DEFINED(_SpInit) ? _SpInit : _EndInitStackSpace; +_InitPc = DEFINED(_InitPc) ? _InitPc : _SdramBase + 0x400; + +_InitStackSize = DEFINED(StackSize) ? StackSize : 0x2000; /* 8 kB */ +_TopRamReserved = DEFINED(_TopRamReserved) ? _TopRamReserved : 0; + +_RamBase = DEFINED(_SdramBase) ? _SdramBase : _SdramBase; +_RamSize = DEFINED(_SdramSize) ? _SdramSize : _SdramSize; +_VBR = DEFINED(_VBR) ? _VBR : _RamBase; + +__MBAR = DEFINED(__MBAR) ? __MBAR : 0x10000000; + +ENTRY(start) +MEMORY +{ + sdram : ORIGIN = 0x400 , LENGTH = 64M - 0x400 + code_flash : ORIGIN = 0xE0000000, LENGTH = 16M + boot_flash : ORIGIN = 0xFF800000, LENGTH = 2M +} + +SECTIONS +{ + + _header_offset = 0; + + /* + * Text, data and bss segments .vectors + */ + .vectors : { + *(.vectors*) + } >boot_flash + .text : { + + *(.text*) + *(.ram_code) + + /* + * C++ constructors/destructors + */ + *(.gnu.linkonce.t.*) + + /* + * Initialization and finalization code. + * + * Various files can provide initialization and finalization + * functions. crtbegin.o and crtend.o are two instances. The + * body of these functions are in .init and .fini sections. We + * accumulate the bodies here, and prepend function prologues + * from crti.o and function epilogues from crtn.o. crti.o must + * be linked first; crtn.o must be linked last. Because these + * are wildcards, it doesn't matter if the user does not + * actually link against crti.o and crtn.o; the linker won't + * look for a file to match a wildcard. The wildcard also + * means that it doesn't matter which directory crti.o and + * crtn.o are in. + */ + PROVIDE (_init = .); + *crti.o(.init) + *(.init) + *crtn.o(.init) + PROVIDE (_fini = .); + *crti.o(.fini) + *(.fini) + *crtn.o(.fini) + + /* + * Special FreeBSD sysctl sections. + */ + . = ALIGN (16); + __start_set_sysctl_set = .; + *(set_sysctl_*); + __stop_set_sysctl_set = ABSOLUTE(.); + *(set_domain_*); + *(set_pseudo_*); + + + /* + * C++ constructors/destructors + * + * gcc uses crtbegin.o to find the start of the constructors + * and destructors so we make sure it is first. Because this + * is a wildcard, it doesn't matter if the user does not + * actually link against crtbegin.o; the linker won't look for + * a file to match a wildcard. The wildcard also means that + * it doesn't matter which directory crtbegin.o is in. The + * constructor and destructor list are terminated in + * crtend.o. The same comments apply to it. + */ + . = ALIGN (16); + *crtbegin.o(.ctors) + *(.ctors) + *crtend.o(.ctors) + *crtbegin.o(.dtors) + *(.dtors) + *crtend.o(.dtors) + + /* + * Exception frame info + */ + . = ALIGN (16); + *(.eh_frame) + + /* + * Read-only data + */ + . = ALIGN (16); + _rodata_start = . ; + *(.rodata*) + *(.gnu.linkonce.r*) + + . = ALIGN (16); + + *(.console_gdb_xfer) + *(.bootstrap_data) + . = ALIGN(16); + _estuff = .; + PROVIDE (_etext = .); + } >boot_flash + + .data : AT(LOADADDR(.text) + SIZEOF(.text)) { + /*.data : {*/ + PROVIDE( _data_dest_start = . ); + PROVIDE( _copy_start = .); + *(.data*) + *(.gnu.linkonce.d*) + *(.gcc_except_table) + *(.jcr) + . = ALIGN (16); + PROVIDE (_edata = .); + PROVIDE (_copy_end = .); + PROVIDE (_data_dest_end = . ); + } >sdram + + _data_src_start = _etext; /*LOADADDR(.data);*/ + _data_src_end = _data_src_start + SIZEOF(.data); + + .bss : { + PROVIDE (_clear_start = .); + *(.bss*) + *(COMMON) + . = ALIGN (16); + PROVIDE (end = .); + PROVIDE (_clear_end = .); + . = ALIGN (4); + PROVIDE (_StartInitStackSpace = .); + /*. = _StartInitStackSpace + _InitStackSize;*/ + . += _InitStackSize; + PROVIDE (_EndInitStackSpace = .); + PROVIDE (_WorkspaceBase = .); + } >sdram + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + +PROVIDE (end_of_all = .); +} -- cgit v1.2.3