source: rtos_arduino/trunk/arduino_lib/hardware/tools/CMSIS/Device/ATMEL/samd21/source/as_gcc/samd21e18a_sram.ld@ 136

Last change on this file since 136 was 136, checked in by ertl-honda, 8 years ago

ライブラリとOS及びベーシックなサンプルの追加.

File size: 4.4 KB
Line 
1/**
2 * \file
3 *
4 * \brief Linker script for running in internal SRAM on the SAMD21E18A
5 *
6 * Copyright (c) 2014 Atmel Corporation. All rights reserved.
7 *
8 * \asf_license_start
9 *
10 * \page License
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 *
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 *
18 * 2. Redistributions in binary form must reproduce the above copyright notice,
19 * this list of conditions and the following disclaimer in the documentation
20 * and/or other materials provided with the distribution.
21 *
22 * 3. The name of Atmel may not be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * 4. This software may only be redistributed and used in connection with an
26 * Atmel microcontroller product.
27 *
28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39 *
40 * \asf_license_stop
41 *
42 */
43
44
45OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
46OUTPUT_ARCH(arm)
47SEARCH_DIR(.)
48
49/* Memory Spaces Definitions */
50MEMORY
51{
52 ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
53}
54
55/* The stack size used by the application. NOTE: you need to adjust according to your application. */
56STACK_SIZE = DEFINED(STACK_SIZE) ? STACK_SIZE : DEFINED(__stack_size__) ? __stack_size__ : 0x2000;
57
58/* Section Definitions */
59SECTIONS
60{
61 .text :
62 {
63 . = ALIGN(4);
64 _sfixed = .;
65 KEEP(*(.vectors .vectors.*))
66 *(.text .text.* .gnu.linkonce.t.*)
67 *(.glue_7t) *(.glue_7)
68 *(.rodata .rodata* .gnu.linkonce.r.*)
69 *(.ARM.extab* .gnu.linkonce.armextab.*)
70
71 /* Support C constructors, and C destructors in both user code
72 and the C library. This also provides support for C++ code. */
73 . = ALIGN(4);
74 KEEP(*(.init))
75 . = ALIGN(4);
76 __preinit_array_start = .;
77 KEEP (*(.preinit_array))
78 __preinit_array_end = .;
79
80 . = ALIGN(4);
81 __init_array_start = .;
82 KEEP (*(SORT(.init_array.*)))
83 KEEP (*(.init_array))
84 __init_array_end = .;
85
86 . = ALIGN(4);
87 KEEP (*crtbegin.o(.ctors))
88 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
89 KEEP (*(SORT(.ctors.*)))
90 KEEP (*crtend.o(.ctors))
91
92 . = ALIGN(4);
93 KEEP(*(.fini))
94
95 . = ALIGN(4);
96 __fini_array_start = .;
97 KEEP (*(.fini_array))
98 KEEP (*(SORT(.fini_array.*)))
99 __fini_array_end = .;
100
101 KEEP (*crtbegin.o(.dtors))
102 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
103 KEEP (*(SORT(.dtors.*)))
104 KEEP (*crtend.o(.dtors))
105
106 . = ALIGN(4);
107 _efixed = .; /* End of text section */
108 } > ram
109
110 . = ALIGN(4);
111 _etext = .;
112
113 .relocate : AT (_etext)
114 {
115 . = ALIGN(4);
116 _srelocate = .;
117 *(.ramfunc .ramfunc.*);
118 *(.data .data.*);
119 . = ALIGN(4);
120 _erelocate = .;
121 } > ram
122
123 /* .bss section which is used for uninitialized data */
124 .bss (NOLOAD) :
125 {
126 . = ALIGN(4);
127 _sbss = . ;
128 _szero = .;
129 *(.bss .bss.*)
130 *(COMMON)
131 . = ALIGN(4);
132 _ebss = . ;
133 _ezero = .;
134 } > ram
135
136 /* stack section */
137 .stack (NOLOAD):
138 {
139 . = ALIGN(8);
140 _sstack = .;
141 . = . + STACK_SIZE;
142 . = ALIGN(8);
143 _estack = .;
144 } > ram
145
146 /* .ARM.exidx is sorted, so has to go in its own output section. */
147 PROVIDE_HIDDEN (__exidx_start = .);
148 .ARM.exidx :
149 {
150 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
151 } > ram
152 PROVIDE_HIDDEN (__exidx_end = .);
153
154 . = ALIGN(4);
155 _end = . ;
156}
Note: See TracBrowser for help on using the repository browser.