annotate Lib/mk20dx128.ld @ 412:e7a3be42ae1e

Debug code for interconnect cable debugging
author Jacob Alexander <haata@kiibohd.com>
date Sat, 20 Feb 2016 13:27:49 -0800
parents f4d4cad283c6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
116
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
1 /* Teensyduino Core Library
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
2 * http://www.pjrc.com/teensy/
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
3 * Copyright (c) 2013 PJRC.COM, LLC.
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
4 *
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
5 * Permission is hereby granted, free of charge, to any person obtaining
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
6 * a copy of this software and associated documentation files (the
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
7 * "Software"), to deal in the Software without restriction, including
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
8 * without limitation the rights to use, copy, modify, merge, publish,
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
9 * distribute, sublicense, and/or sell copies of the Software, and to
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
10 * permit persons to whom the Software is furnished to do so, subject to
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
11 * the following conditions:
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
12 *
170
85d74e5e1a95 More work on mk20dx128vlf5 port.
Jacob Alexander <haata@kiibohd.com>
parents: 116
diff changeset
13 * 1. The above copyright notice and this permission notice shall be
116
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
14 * included in all copies or substantial portions of the Software.
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
15 *
170
85d74e5e1a95 More work on mk20dx128vlf5 port.
Jacob Alexander <haata@kiibohd.com>
parents: 116
diff changeset
16 * 2. If the Software is incorporated into a build system that allows
116
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
17 * selection among a list of target devices, then similar target
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
18 * devices manufactured by PJRC.COM must be included in the list of
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
19 * target devices and selectable in the same manner.
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
20 *
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
24 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
25 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
26 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
28 * SOFTWARE.
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
29 */
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
30
70
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
31 MEMORY
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
32 {
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
33 FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 128K
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
34 RAM (rwx) : ORIGIN = 0x1FFFE000, LENGTH = 16K
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
35 }
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
36
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
37
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
38 SECTIONS
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
39 {
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
40 .text : {
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
41 . = 0;
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
42 KEEP(*(.vectors))
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
43 *(.startup*)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
44 /* TODO: does linker detect startup overflow onto flashconfig? */
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
45 . = 0x400;
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
46 KEEP(*(.flashconfig*))
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
47 *(.text*)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
48 *(.rodata*)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
49 . = ALIGN(4);
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
50 KEEP(*(.init))
175
c70f641581b5 McHCK USB WORKS!!
Jacob Alexander <haata@kiibohd.com>
parents: 170
diff changeset
51
70
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
52 . = ALIGN(4);
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
53 __preinit_array_start = .;
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
54 KEEP (*(.preinit_array))
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
55 __preinit_array_end = .;
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
56 __init_array_start = .;
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
57 KEEP (*(SORT(.init_array.*)))
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
58 KEEP (*(.init_array))
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
59 __init_array_end = .;
175
c70f641581b5 McHCK USB WORKS!!
Jacob Alexander <haata@kiibohd.com>
parents: 170
diff changeset
60
70
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
61 } > FLASH = 0xFF
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
62
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
63 .ARM.exidx : {
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
64 __exidx_start = .;
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
65 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
66 __exidx_end = .;
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
67 } > FLASH
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
68 _etext = .;
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
69
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
70 .usbdescriptortable (NOLOAD) : {
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
71 /* . = ORIGIN(RAM); */
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
72 . = ALIGN(512);
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
73 *(.usbdescriptortable*)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
74 } > RAM
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
75
116
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
76 .dmabuffers (NOLOAD) : {
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
77 . = ALIGN(4);
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
78 *(.dmabuffers*)
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
79 } > RAM
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
80
70
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
81 .usbbuffers (NOLOAD) : {
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
82 . = ALIGN(4);
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
83 *(.usbbuffers*)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
84 } > RAM
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
85
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
86 .data : AT (_etext) {
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
87 . = ALIGN(4);
330
f4d4cad283c6 Some initial bringup of the dfu bootloader on the mk20dx256vlh7
Jacob Alexander <haata@kiibohd.com>
parents: 175
diff changeset
88 _sdata = .;
70
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
89 *(.data*)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
90 . = ALIGN(4);
330
f4d4cad283c6 Some initial bringup of the dfu bootloader on the mk20dx256vlh7
Jacob Alexander <haata@kiibohd.com>
parents: 175
diff changeset
91 _edata = .;
70
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
92 } > RAM
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
93
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
94 .noinit (NOLOAD) : {
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
95 *(.noinit*)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
96 } > RAM
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
97
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
98 .bss : {
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
99 . = ALIGN(4);
330
f4d4cad283c6 Some initial bringup of the dfu bootloader on the mk20dx256vlh7
Jacob Alexander <haata@kiibohd.com>
parents: 175
diff changeset
100 _sbss = .;
70
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
101 *(.bss*)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
102 *(COMMON)
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
103 . = ALIGN(4);
116
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
104 _ebss = .;
14b5469b1098 Initial import of Teensyduino 1.8rc2 (for Teensy 3.1 Support).
Jacob Alexander <haata@kiibohd.com>
parents: 70
diff changeset
105 __bss_end = .;
70
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
106 } > RAM
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
107
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
108 _estack = ORIGIN(RAM) + LENGTH(RAM);
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
109 }
23600aaa5e15 Adding initial Teensy 3 support, compiles, but not fully functional yet.
Jacob Alexander <triplehaata@gmail.com>
parents:
diff changeset
110