2 ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
4 This file is part of ChibiOS.
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.
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.
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/>.
21 * KL25Z64 memory setup.
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
35 __ram_start__ = ORIGIN(ram);
36 __ram_size__ = LENGTH(ram);
37 __ram_end__ = __ram_start__ + __ram_size__;
39 __eeprom_workarea_start__ = ORIGIN(eeprom_emu);
40 __eeprom_workarea_size__ = LENGTH(eeprom_emu);
41 __eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__;
47 .isr : ALIGN(4) SUBALIGN(4)
52 .cfmprotect : ALIGN(4) SUBALIGN(4)
59 constructors : ALIGN(4) SUBALIGN(4)
61 PROVIDE(__init_array_start = .);
62 KEEP(*(SORT(.init_array.*)))
64 PROVIDE(__init_array_end = .);
67 destructors : ALIGN(4) SUBALIGN(4)
69 PROVIDE(__fini_array_start = .);
71 KEEP(*(SORT(.fini_array.*)))
72 PROVIDE(__fini_array_end = .);
75 .text : ALIGN(4) SUBALIGN(4)
88 *(.ARM.extab* .gnu.linkonce.armextab.*)
92 PROVIDE(__exidx_start = .);
93 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
94 PROVIDE(__exidx_end = .);
102 .eh_frame : ONLY_IF_RO
107 .textalign : ONLY_IF_RO
118 __main_stack_base__ = .;
119 . += __main_stack_size__;
121 __main_stack_end__ = .;
122 __process_stack_base__ = .;
123 __main_thread_stack_base__ = .;
124 . += __process_stack_size__;
126 __process_stack_end__ = .;
127 __main_thread_stack_end__ = .;
146 PROVIDE(_bss_start = .);
153 PROVIDE(_bss_end = .);
160 __heap_base__ = _end;
161 __heap_end__ = __ram_end__;