]> git.gir.st - tmk_keyboard.git/blob - keyboard/teensy_lc_onekey/ld/MKL26Z64.ld
Merge remote-tracking branch 'upstream/master' into chibios
[tmk_keyboard.git] / keyboard / teensy_lc_onekey / ld / MKL26Z64.ld
1 /*
2 ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
3
4 This file is part of ChibiOS.
5
6 ChibiOS is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 ChibiOS is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 /*
21 * KL25Z64 memory setup.
22 */
23
24 ENTRY(Reset_Handler)
25
26 MEMORY
27 {
28 flash0 : org = 0x00000000, len = 0xc0
29 flashcfg : org = 0x00000400, len = 0x10
30 flash : org = 0x00000410, len = 62k - 0x410
31 eeprom_emu : org = 0x0000F800, len = 2k
32 ram : org = 0x1FFFF800, len = 8k
33 }
34
35 __ram_start__ = ORIGIN(ram);
36 __ram_size__ = LENGTH(ram);
37 __ram_end__ = __ram_start__ + __ram_size__;
38
39 __eeprom_workarea_start__ = ORIGIN(eeprom_emu);
40 __eeprom_workarea_size__ = LENGTH(eeprom_emu);
41 __eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__;
42
43 SECTIONS
44 {
45 . = 0;
46
47 .isr : ALIGN(4) SUBALIGN(4)
48 {
49 KEEP(*(.vectors))
50 } > flash0
51
52 .cfmprotect : ALIGN(4) SUBALIGN(4)
53 {
54 KEEP(*(.cfmconfig))
55 } > flashcfg
56
57 _text = .;
58
59 constructors : ALIGN(4) SUBALIGN(4)
60 {
61 PROVIDE(__init_array_start = .);
62 KEEP(*(SORT(.init_array.*)))
63 KEEP(*(.init_array))
64 PROVIDE(__init_array_end = .);
65 } > flash
66
67 destructors : ALIGN(4) SUBALIGN(4)
68 {
69 PROVIDE(__fini_array_start = .);
70 KEEP(*(.fini_array))
71 KEEP(*(SORT(.fini_array.*)))
72 PROVIDE(__fini_array_end = .);
73 } > flash
74
75 .text : ALIGN(4) SUBALIGN(4)
76 {
77 *(.text)
78 *(.text.*)
79 *(.rodata)
80 *(.rodata.*)
81 *(.glue_7t)
82 *(.glue_7)
83 *(.gcc*)
84 } > flash
85
86 .ARM.extab :
87 {
88 *(.ARM.extab* .gnu.linkonce.armextab.*)
89 } > flash
90
91 .ARM.exidx : {
92 PROVIDE(__exidx_start = .);
93 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
94 PROVIDE(__exidx_end = .);
95 } > flash
96
97 .eh_frame_hdr :
98 {
99 *(.eh_frame_hdr)
100 } > flash
101
102 .eh_frame : ONLY_IF_RO
103 {
104 *(.eh_frame)
105 } > flash
106
107 .textalign : ONLY_IF_RO
108 {
109 . = ALIGN(8);
110 } > flash
111
112 _etext = .;
113 _textdata = _etext;
114
115 .stacks :
116 {
117 . = ALIGN(8);
118 __main_stack_base__ = .;
119 . += __main_stack_size__;
120 . = ALIGN(8);
121 __main_stack_end__ = .;
122 __process_stack_base__ = .;
123 __main_thread_stack_base__ = .;
124 . += __process_stack_size__;
125 . = ALIGN(8);
126 __process_stack_end__ = .;
127 __main_thread_stack_end__ = .;
128 } > ram
129
130 .data :
131 {
132 . = ALIGN(4);
133 PROVIDE(_data = .);
134 *(.data)
135 . = ALIGN(4);
136 *(.data.*)
137 . = ALIGN(4);
138 *(.ramtext)
139 . = ALIGN(4);
140 PROVIDE(_edata = .);
141 } > ram AT > flash
142
143 .bss :
144 {
145 . = ALIGN(4);
146 PROVIDE(_bss_start = .);
147 *(.bss)
148 . = ALIGN(4);
149 *(.bss.*)
150 . = ALIGN(4);
151 *(COMMON)
152 . = ALIGN(4);
153 PROVIDE(_bss_end = .);
154 } > ram
155 }
156
157 PROVIDE(end = .);
158 _end = .;
159
160 __heap_base__ = _end;
161 __heap_end__ = __ram_end__;
Imprint / Impressum