diff options
Diffstat (limited to 'lib/chibios/os/common/startup/e200/compilers/GHS/ld/SPC560B50.ld')
-rw-r--r-- | lib/chibios/os/common/startup/e200/compilers/GHS/ld/SPC560B50.ld | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/e200/compilers/GHS/ld/SPC560B50.ld b/lib/chibios/os/common/startup/e200/compilers/GHS/ld/SPC560B50.ld new file mode 100644 index 000000000..52d6fe834 --- /dev/null +++ b/lib/chibios/os/common/startup/e200/compilers/GHS/ld/SPC560B50.ld | |||
@@ -0,0 +1,165 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | /* | ||
18 | * SPC560B50 memory setup. | ||
19 | */ | ||
20 | MEMORY | ||
21 | { | ||
22 | flash : org = 0x00000000, len = 512k | ||
23 | dataflash : org = 0x00800000, len = 64k | ||
24 | ram : org = 0x40000000, len = 32k | ||
25 | } | ||
26 | |||
27 | OPTION ("-e=_reset_address") | ||
28 | |||
29 | SECTIONS | ||
30 | { | ||
31 | .boot0 ALIGN(16) : | ||
32 | { | ||
33 | *(.boot) | ||
34 | *(.handlers) | ||
35 | *(.crt0) | ||
36 | } > flash | ||
37 | |||
38 | .vectors ALIGN(0x800) : | ||
39 | { | ||
40 | /* The vectors table requires a 2kB alignment.*/ | ||
41 | *(.vectors) | ||
42 | } > flash | ||
43 | |||
44 | .ivors ALIGN(0x1000) : | ||
45 | { | ||
46 | /* The IVORs table requires a 4kB alignment.*/ | ||
47 | __ivpr_base__ = .; | ||
48 | *(.ivors) | ||
49 | } > flash | ||
50 | |||
51 | constructors ALIGN(4) : | ||
52 | { | ||
53 | PROVIDE(__init_array_start = .); | ||
54 | "*(.init_array.*)" | ||
55 | *(.init_array) | ||
56 | PROVIDE(__init_array_end = .); | ||
57 | } > flash | ||
58 | |||
59 | destructors ALIGN(4) : | ||
60 | { | ||
61 | PROVIDE(__fini_array_start = .); | ||
62 | *(.fini_array) | ||
63 | "*(.fini_array.*)" | ||
64 | PROVIDE(__fini_array_end = .); | ||
65 | } > flash | ||
66 | |||
67 | .vletext ALIGN(16) : | ||
68 | { | ||
69 | *(.vletext) | ||
70 | "*(.vletext.*)" | ||
71 | } > flash | ||
72 | |||
73 | .text ALIGN(16) : | ||
74 | { | ||
75 | *(.text) | ||
76 | "*(.text.*)" | ||
77 | } > flash | ||
78 | |||
79 | .rodata ALIGN(16) : | ||
80 | { | ||
81 | *(.rodata) | ||
82 | "*(.rodata.*)" | ||
83 | *(.rodata1) | ||
84 | } > flash | ||
85 | |||
86 | .sdata2 ALIGN(16) : | ||
87 | { | ||
88 | __sdata2_start__ = . + 0x8000; | ||
89 | *(.sdata2) | ||
90 | "*(.sdata2.*)" | ||
91 | *(.sbss2) | ||
92 | "*(.sbss2.*)" | ||
93 | } > flash | ||
94 | |||
95 | .stacks ALIGN(16) : | ||
96 | { | ||
97 | . = ALIGN(8); | ||
98 | __irq_stack_base__ = .; | ||
99 | . += __irq_stack_size__; | ||
100 | . = ALIGN(8); | ||
101 | __irq_stack_end__ = .; | ||
102 | __process_stack_base__ = .; | ||
103 | __main_thread_stack_base__ = .; | ||
104 | . += __process_stack_size__; | ||
105 | . = ALIGN(8); | ||
106 | __process_stack_end__ = .; | ||
107 | __main_thread_stack_end__ = .; | ||
108 | } > ram | ||
109 | |||
110 | .romdatastart ALIGN(16) : | ||
111 | { | ||
112 | __romdata_start__ = .; | ||
113 | } > flash | ||
114 | |||
115 | .data ALIGN(4) : AT(__romdata_start__) | ||
116 | { | ||
117 | __data_start__ = .; | ||
118 | *(.data) | ||
119 | "*(.data.*)" | ||
120 | . = ALIGN(4); | ||
121 | *(.ramtext) | ||
122 | . = ALIGN(4); | ||
123 | __data_end__ = .; | ||
124 | } > ram | ||
125 | |||
126 | __romsdata_start__ = (__data_end__ - __data_start__) + __romdata_start__; | ||
127 | |||
128 | .sdata ALIGN(4) : AT(__romsdata_start__) | ||
129 | { | ||
130 | __sdata_start__ = . + 0x8000; | ||
131 | *(.sdata) | ||
132 | "*(.sdata.*)" | ||
133 | } > ram | ||
134 | |||
135 | .sbss ALIGN(4) : | ||
136 | { | ||
137 | __bss_start__ = .; | ||
138 | *(.sbss) | ||
139 | "*(.sbss.*)" | ||
140 | *(.scommon) | ||
141 | } > ram | ||
142 | |||
143 | .bss ALIGN(4) : | ||
144 | { | ||
145 | *(.bss) | ||
146 | "*(.bss.*)" | ||
147 | *(COMMON) | ||
148 | __bss_end__ = .; | ||
149 | } > ram | ||
150 | |||
151 | __flash_size__ = SIZEOF(flash); | ||
152 | __flash_start__ = ADDR(flash); | ||
153 | __flash_end__ = ENDADDR(flash); | ||
154 | |||
155 | __dataflash_size__ = SIZEOF(dataflash); | ||
156 | __dataflash_start__ = ADDR(dataflash); | ||
157 | __dataflash_end__ = ENDADDR(dataflash); | ||
158 | |||
159 | __ram_size__ = SIZEOF(ram); | ||
160 | __ram_start__ = ADDR(ram); | ||
161 | __ram_end__ = ENDADDR(ram); | ||
162 | |||
163 | __heap_base__ = __bss_end__; | ||
164 | __heap_end__ = __ram_end__; | ||
165 | } | ||