]> git.sur5r.net Git - openocd/blob - testing/examples/LPC2148Test/prj/lpc2148_rom.ld
73df37cbe543141791e221d18001a72f950ab21f
[openocd] / testing / examples / LPC2148Test / prj / lpc2148_rom.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 *  26.01.08  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  * This file, olimex_lpcp2148_ram.ld, locate the program in the internal\r
52  * ram of the LPC2148. For more information about the memory of the LPC2148\r
53  * take a look in the LPC2141/2142/2144/2146/2148 USER MANUAL.\r
54  * Reference is made to the user manual from 25 July 2006 Rev. 02\r
55  *\r
56  * Take a look at page 8, section 1.Memory maps\r
57  */\r
58  \r
59 MEMORY\r
60 {\r
61   rom : org = 0x00000000, len = 512k    \r
62   ram : org = 0x40000000, len = 32k\r
63 }\r
64 \r
65 /*\r
66  * Do not change the next code\r
67  */\r
68 SECTIONS\r
69 {\r
70   .text :\r
71   {\r
72     *(.vectors);\r
73     . = ALIGN(4);\r
74     *(.init);\r
75     . = ALIGN(4);\r
76     *(.text);\r
77     . = ALIGN(4);\r
78     *(.rodata);\r
79     . = ALIGN(4);\r
80     *(.rodata*);\r
81     . = ALIGN(4);\r
82     *(.glue_7t);\r
83     . = ALIGN(4);\r
84     *(.glue_7);\r
85     . = ALIGN(4);\r
86     etext = .;\r
87   } > rom\r
88 \r
89   .data :\r
90   {\r
91     PROVIDE (__data_start = .);\r
92     *(.data)\r
93     . = ALIGN(4);\r
94     edata = .;\r
95     _edata = .;\r
96     PROVIDE (__data_end = .);\r
97   } > ram\r
98 \r
99   .bss :\r
100   {\r
101     PROVIDE (__bss_start = .);\r
102     *(.bss)\r
103     *(COMMON)\r
104     . = ALIGN(4);\r
105     PROVIDE (__bss_end = .);\r
106     \r
107     . = ALIGN(256);\r
108     \r
109     PROVIDE (__stack_start = .);\r
110     \r
111     PROVIDE (__stack_fiq_start = .);\r
112     . += FIQ_STACK_SIZE;\r
113     . = ALIGN(4);\r
114     PROVIDE (__stack_fiq_end = .);\r
115 \r
116     PROVIDE (__stack_irq_start = .);\r
117     . += IRQ_STACK_SIZE;\r
118     . = ALIGN(4);\r
119     PROVIDE (__stack_irq_end = .);\r
120 \r
121     PROVIDE (__stack_abt_start = .);\r
122     . += ABT_STACK_SIZE;\r
123     . = ALIGN(4);\r
124     PROVIDE (__stack_abt_end = .);\r
125 \r
126     PROVIDE (__stack_und_start = .);\r
127     . += UND_STACK_SIZE;\r
128     . = ALIGN(4);\r
129     PROVIDE (__stack_und_end = .);\r
130 \r
131     PROVIDE (__stack_svc_start = .);\r
132     . += SVC_STACK_SIZE;\r
133     . = ALIGN(4);\r
134     PROVIDE (__stack_svc_end = .);\r
135     PROVIDE (__stack_end = .);\r
136     PROVIDE (__heap_start = .);   \r
137   } > ram\r
138     \r
139 }\r
140 /*** EOF ***/\r
141 \r