]> git.donarmstrong.com Git - kiibohd-controller.git/blob - Lib/mk20dx256vlh7.bootloader.ld
Merge pull request #33 from smasher816/devel
[kiibohd-controller.git] / Lib / mk20dx256vlh7.bootloader.ld
1 /* Teensyduino Core Library
2  * http://www.pjrc.com/teensy/
3  * Copyright (c) 2013 PJRC.COM, LLC.
4  * Modifications by Jacob Alexander 2014 for use with McHCK and Kiibohd-dfu
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining
7  * a copy of this software and associated documentation files (the
8  * "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish,
10  * distribute, sublicense, and/or sell copies of the Software, and to
11  * permit persons to whom the Software is furnished to do so, subject to
12  * the following conditions:
13  *
14  * 1. The above copyright notice and this permission notice shall be
15  * included in all copies or substantial portions of the Software.
16  *
17  * 2. If the Software is incorporated into a build system that allows
18  * selection among a list of target devices, then similar target
19  * devices manufactured by PJRC.COM must be included in the list of
20  * target devices and selectable in the same manner.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
26  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29  * SOFTWARE.
30  */
31
32 /* XXX Not tested yet -HaaTa */
33
34 MEMORY
35 {
36         FLASH (rx)     : ORIGIN = 0x0, LENGTH = 256K
37         FLASH_APP (rx) : ORIGIN = 8K, LENGTH = 256K-8K
38         RAM  (rwx)     : ORIGIN = 0x20000000 - 64K / 2, LENGTH = 64K
39 }
40
41 /* Starting Address of the application ROM */
42 _app_rom = ORIGIN( FLASH_APP );
43
44 FlexRAM = 0x14000000;
45 FTFL = 0x40020000;
46 SCB = 0xe000ed00;
47 USB0 = 0x40072000;
48 SIM = 0x40047000;
49
50 /* Section Definitions */
51 SECTIONS
52 {
53         .text :
54         {
55                 . = 0;
56                 KEEP(* (.vectors))
57                 *(.startup*)
58                 . = 0x400;
59                 *(.rodata*)
60                 KEEP(* (.flashconfig))
61                 *(.text*)
62                 . = ALIGN(4);
63                 KEEP(*(.init))
64         } > FLASH
65
66         .ARM.exidx :
67         {
68                 __exidx_start = .;
69                 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
70                 __exidx_end = .;
71         } > FLASH
72         _etext = .;
73
74         .usbdescriptortable (NOLOAD) : {
75                 . = ALIGN(512);
76                 *(.usbdescriptortable*)
77         } > RAM
78
79         .dmabuffers (NOLOAD) : {
80                 . = ALIGN(4);
81                 *(.dmabuffers*)
82         } > RAM
83
84         .usbbuffers (NOLOAD) : {
85                 . = ALIGN(4);
86                 *(.usbbuffers*)
87         } > RAM
88
89         .data : AT (_etext) {
90                 . = ALIGN(4);
91                 _sdata = .;
92                 *(SORT_BY_ALIGNMENT(.ramtext.*) SORT_BY_ALIGNMENT(.data*))
93                 *(.data*)
94                 . = ALIGN(4);
95                 _edata = .;
96         } > RAM
97
98         .noinit (NOLOAD) : {
99                 *(.noinit*)
100         } > RAM
101
102         .bss : {
103                 . = ALIGN(4);
104                 _sbss = .;
105                 *(.bss*)
106                 *(COMMON)
107                 . = ALIGN(4);
108                 _ebss = .;
109                 __bss_end = .;
110         } > RAM
111
112         _estack = ORIGIN(RAM) + LENGTH(RAM);
113 }
114