b181023bb481dbf1807be8e80d601606862b2375
[fw/openocd] / testing / examples / SAM7S256Test / prj / sam7s256_rom.ld
1 /****************************************************************************
2 *  Copyright (c) 2006 by Michael Fischer. All rights reserved.
3 *
4 *  Redistribution and use in source and binary forms, with or without 
5 *  modification, are permitted provided that the following conditions 
6 *  are met:
7 *  
8 *  1. Redistributions of source code must retain the above copyright 
9 *     notice, this list of conditions and the following disclaimer.
10 *  2. Redistributions in binary form must reproduce the above copyright
11 *     notice, this list of conditions and the following disclaimer in the 
12 *     documentation and/or other materials provided with the distribution.
13 *  3. Neither the name of the author nor the names of its contributors may 
14 *     be used to endorse or promote products derived from this software 
15 *     without specific prior written permission.
16 *
17 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
18 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
19 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
20 *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 
21 *  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
22 *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
23 *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
24 *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
25 *  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
26 *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
27 *  THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
28 *  SUCH DAMAGE.
29 *
30 ****************************************************************************
31 *
32 *  History:
33 *
34 *  26.01.08  mifi   First Version
35 ****************************************************************************/
36
37
38 ENTRY(ResetHandler)
39 SEARCH_DIR(.)
40
41 /*
42  * Define stack size here
43  */
44 FIQ_STACK_SIZE = 0x0100;
45 IRQ_STACK_SIZE = 0x0100;
46 ABT_STACK_SIZE = 0x0100;
47 UND_STACK_SIZE = 0x0100;
48 SVC_STACK_SIZE = 0x0400;
49
50
51 MEMORY
52 {
53   rom : org = 0x00100000, len = 256k
54   ram : org = 0x00200000, len = 64k
55 }
56
57 /*
58  * Do not change the next code
59  */
60 SECTIONS
61 {
62   .text :
63   {
64     *(.vectors);
65     . = ALIGN(4);
66     *(.init);
67     . = ALIGN(4);
68     *(.text);
69     . = ALIGN(4);
70     *(.rodata);
71     . = ALIGN(4);
72     *(.rodata*);
73     . = ALIGN(4);
74     *(.glue_7t);
75     . = ALIGN(4);
76     *(.glue_7);
77     . = ALIGN(4);
78     etext = .;
79   } > rom
80
81   .data :
82   {
83     PROVIDE (__data_start = .);
84     *(.data)
85     . = ALIGN(4);
86     edata = .;
87     _edata = .;
88     PROVIDE (__data_end = .);
89   } > ram
90
91   .bss :
92   {
93     PROVIDE (__bss_start = .);
94     *(.bss)
95     *(COMMON)
96     . = ALIGN(4);
97     PROVIDE (__bss_end = .);
98     
99     . = ALIGN(256);
100     
101     PROVIDE (__stack_start = .);
102     
103     PROVIDE (__stack_fiq_start = .);
104     . += FIQ_STACK_SIZE;
105     . = ALIGN(4);
106     PROVIDE (__stack_fiq_end = .);
107
108     PROVIDE (__stack_irq_start = .);
109     . += IRQ_STACK_SIZE;
110     . = ALIGN(4);
111     PROVIDE (__stack_irq_end = .);
112
113     PROVIDE (__stack_abt_start = .);
114     . += ABT_STACK_SIZE;
115     . = ALIGN(4);
116     PROVIDE (__stack_abt_end = .);
117
118     PROVIDE (__stack_und_start = .);
119     . += UND_STACK_SIZE;
120     . = ALIGN(4);
121     PROVIDE (__stack_und_end = .);
122
123     PROVIDE (__stack_svc_start = .);
124     . += SVC_STACK_SIZE;
125     . = ALIGN(4);
126     PROVIDE (__stack_svc_end = .);
127     PROVIDE (__stack_end = .);
128     PROVIDE (__heap_start = .);   
129   } > ram
130     
131 }
132 /*** EOF ***/