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