blob: 00040c85b08d9c36604bb4ff6eeb32be4ad54441 [file] [log] [blame]
Harald Welte3f5e3dd2017-02-27 13:53:17 +01001/* ----------------------------------------------------------------------------
2 * ATMEL Microcontroller Software Support
3 * ----------------------------------------------------------------------------
4 * Copyright (c) 2009, Atmel Corporation
5 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are met:
10 *
11 * - Redistributions of source code must retain the above copyright notice,
12 * this list of conditions and the disclaimer below.
13 *
14 * Atmel's name may not be used to endorse or promote products derived from
15 * this software without specific prior written permission.
16 *
17 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
20 * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
23 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 * ----------------------------------------------------------------------------
28 */
29
30/*------------------------------------------------------------------------------
31 * Linker script for running in internal SRAM on the AT91SAM3S2
32 *----------------------------------------------------------------------------*/
33
34OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
35OUTPUT_ARCH(arm)
36ENTRY(entry)
37
38/* Memory Spaces Definitions */
39MEMORY
40{
41 romcodesram (W!RX) : ORIGIN = 0x20000000, LENGTH = 0x0800
42 sram (W!RX) : ORIGIN = 0x20000800, LENGTH = 0x00007800 /* sram, 32K - sizeof(romcodesram) */
43}
44
45/* Entry point */
46/*ENTRY (ResetException)*/
47
48SECTIONS
49{
50 /* startup code in the .isr_vector */
51 .text :
52 {
53 . = ALIGN(4);
54 _stext = .;
55 KEEP(*(.isr_vector .isr_vector.*))
56 *(.mailbox)
57 *(.text .text.*)
58 *(.rodata .rodata.*)
59 *(.glue_7)
60 *(.glue_7t)
61 *(.gcc_except_table)
62 *(.rodata .rodata*)
63 *(.gnu.linkonce.r.*)
64 . = ALIGN(4);
65 _etext = .;
66 } > sram
67
68 /* data */
69 .data :
70 {
71 . = ALIGN(4);
72 _sidata = .;
73 _sdata = .;
74
75 *(.data)
76 *(.data.*)
77 . = ALIGN(4);
78 _edata = .;
79 } > sram
80
81 .bss (NOLOAD) : {
82 _szero = .;
83 *(.bss)
84 . = ALIGN(4);
85 _ezero = .;
86 } >sram
87
88 /* Stack in SRAM */
89 _sstack = 0x20007FFC;
90}
91end = .;