2008-09-19 17:13:14 +02:00
|
|
|
/****************************************************************************
|
2012-11-04 18:18:25 +01:00
|
|
|
* configs/mcu123-lpc214x/scripts/ld.script
|
2008-09-19 17:13:14 +02:00
|
|
|
*
|
2012-02-02 05:35:35 +01:00
|
|
|
* Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved.
|
|
|
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
2008-09-19 17:13:14 +02:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
* used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2009-06-11 16:47:03 +02:00
|
|
|
/* FLASH:
|
|
|
|
* The lpc2148 has 512Kb of non-volatile memory beginning at address
|
2012-12-29 00:40:54 +01:00
|
|
|
* 0x0000:0000. The OS entry point is via the reset vector at address
|
|
|
|
* 0x0000:0000 (default MEMMAP mode assumed)
|
2009-06-11 16:47:03 +02:00
|
|
|
*
|
|
|
|
* SRAM:
|
|
|
|
* The lpc2148 has 32Kb of on-chip static RAM beginning at address
|
2012-12-29 00:40:54 +01:00
|
|
|
* 0x4000:0000. The .data section will be relocated from _eronly
|
2009-06-11 16:47:03 +02:00
|
|
|
* to _sdata at boot time.
|
|
|
|
*/
|
|
|
|
|
2009-05-09 17:18:14 +02:00
|
|
|
MEMORY
|
|
|
|
{
|
2009-06-11 16:47:03 +02:00
|
|
|
flash (rx) : ORIGIN = 0x00000000, LENGTH = 500K
|
|
|
|
sram (rw) : ORIGIN = 0x40000000, LENGTH = 32K - 32
|
2009-05-09 17:18:14 +02:00
|
|
|
}
|
|
|
|
|
2008-09-19 17:13:14 +02:00
|
|
|
OUTPUT_ARCH(arm)
|
|
|
|
ENTRY(_stext)
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.text : {
|
|
|
|
_stext = ABSOLUTE(.);
|
2009-06-11 16:47:03 +02:00
|
|
|
*(.vectors)
|
|
|
|
*(.text .text.*)
|
2008-09-19 17:13:14 +02:00
|
|
|
*(.fixup)
|
|
|
|
*(.gnu.warning)
|
2009-06-11 16:47:03 +02:00
|
|
|
*(.rodata .rodata.*)
|
|
|
|
*(.gnu.linkonce.t.*)
|
2008-09-19 17:13:14 +02:00
|
|
|
*(.glue_7)
|
|
|
|
*(.glue_7t)
|
2009-06-11 16:47:03 +02:00
|
|
|
*(.got)
|
|
|
|
*(.gcc_except_table)
|
|
|
|
*(.gnu.linkonce.r.*)
|
2008-09-19 17:13:14 +02:00
|
|
|
_etext = ABSOLUTE(.);
|
2009-05-09 17:18:14 +02:00
|
|
|
} > flash
|
2008-09-19 17:13:14 +02:00
|
|
|
|
2012-11-04 18:18:25 +01:00
|
|
|
.init_section : {
|
|
|
|
_sinit = ABSOLUTE(.);
|
|
|
|
*(.init_array .init_array.*)
|
|
|
|
_einit = ABSOLUTE(.);
|
|
|
|
} > flash
|
2009-06-11 16:47:03 +02:00
|
|
|
|
|
|
|
.ARM.extab : {
|
|
|
|
*(.ARM.extab*)
|
2012-11-04 18:18:25 +01:00
|
|
|
} > flash
|
2009-06-11 16:47:03 +02:00
|
|
|
|
2012-02-02 05:35:35 +01:00
|
|
|
__exidx_start = ABSOLUTE(.);
|
2009-06-11 16:47:03 +02:00
|
|
|
.ARM.exidx : {
|
|
|
|
*(.ARM.exidx*)
|
2012-11-04 18:18:25 +01:00
|
|
|
} > flash
|
2012-02-02 05:35:35 +01:00
|
|
|
__exidx_end = ABSOLUTE(.);
|
2008-09-19 17:13:14 +02:00
|
|
|
|
2012-11-04 18:18:25 +01:00
|
|
|
_eronly = ABSOLUTE(.);
|
|
|
|
|
|
|
|
.data : {
|
|
|
|
_sdata = ABSOLUTE(.);
|
|
|
|
*(.data .data.*)
|
|
|
|
*(.gnu.linkonce.d.*)
|
|
|
|
CONSTRUCTORS
|
|
|
|
_edata = ABSOLUTE(.);
|
|
|
|
} > sram AT > flash
|
|
|
|
|
2009-06-11 16:47:03 +02:00
|
|
|
.bss : {
|
2008-09-19 17:13:14 +02:00
|
|
|
_sbss = ABSOLUTE(.);
|
2009-06-11 16:47:03 +02:00
|
|
|
*(.bss .bss.*)
|
|
|
|
*(.gnu.linkonce.b.*)
|
2008-09-19 17:13:14 +02:00
|
|
|
*(COMMON)
|
|
|
|
_ebss = ABSOLUTE(.);
|
2009-06-11 16:47:03 +02:00
|
|
|
} > sram
|
2009-05-09 17:18:14 +02:00
|
|
|
|
2009-06-11 16:47:03 +02:00
|
|
|
/* Stabs debugging sections. */
|
2008-09-19 17:13:14 +02:00
|
|
|
.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) }
|
|
|
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
|
|
.debug_info 0 : { *(.debug_info) }
|
|
|
|
.debug_line 0 : { *(.debug_line) }
|
|
|
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
|
|
.debug_aranges 0 : { *(.debug_aranges) }
|
|
|
|
}
|