]> git.donarmstrong.com Git - kiibohd-controller.git/blob - Lib/mk20dx256vlh7.ld
Basic code for mk20dx256vlh7 flashing
[kiibohd-controller.git] / Lib / mk20dx256vlh7.ld
1 /* Teensyduino Core Library
2  * http://www.pjrc.com/teensy/
3  * Copyright (c) 2013 PJRC.COM, LLC.
4  * Modifications by Jacob Alexander 2014-2015 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 MEMORY
33 {
34         FLASH (rx) : ORIGIN = 8K, LENGTH = 256K-8K
35         RAM  (rwx) : ORIGIN = 0x20000000 - 64K / 2, LENGTH = 64K
36 }
37
38 /* Section Definitions */
39 SECTIONS
40 {
41         .text :
42         {
43                 . = 0;
44                 KEEP(* (.vectors))
45                 *(.startup*)
46                 . = 0x400; KEEP(* (.flashconfig)) /* MUST BE AT 0x400 */
47                 *(.text*)
48                 *(.rodata*)
49                 . = ALIGN(4);
50                 KEEP(*(.init))
51         } > FLASH
52
53         .ARM.exidx :
54         {
55                 __exidx_start = .;
56                 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
57                 __exidx_end = .;
58         } > FLASH
59         _etext = .;
60
61         .usbdescriptortable (NOLOAD) : {
62                 . = ALIGN(512);
63                 *(.usbdescriptortable*)
64         } > RAM
65
66         .dmabuffers (NOLOAD) : {
67                 . = ALIGN(4);
68                 *(.dmabuffers*)
69         } > RAM
70
71         .usbbuffers (NOLOAD) : {
72                 . = ALIGN(4);
73                 *(.usbbuffers*)
74         } > RAM
75
76         .data : AT (_etext) {
77                 . = ALIGN(4);
78                 _sdata = .;
79                 *(.data*)
80                 . = ALIGN(4);
81                 _edata = .;
82         } > RAM
83
84         .noinit (NOLOAD) : {
85                 *(.noinit*)
86         } > RAM
87
88         .bss : {
89                 . = ALIGN(4);
90                 _sbss = .;
91                 *(.bss*)
92                 *(COMMON)
93                 . = ALIGN(4);
94                 _ebss = .;
95                 __bss_end = .;
96         } > RAM
97
98         _estack = ORIGIN(RAM) + LENGTH(RAM);
99 }
100