CMSIS2000  0.0.7
 Указатель Структуры данных Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Макросы Группы Страницы
gcc_arm_generic_ram.ld
См. документацию.
1 /* Library configurations */
2 GROUP(libgcc.a libc.a libm.a libnosys.a)
3 
4 /* Linker script to place sections and symbol values. Should be used together
5  * with other linker script that defines memory regions FLASH and RAM.
6  * It references following symbols, which must be defined in code:
7  * Reset_Handler : Entry of reset handler
8  *
9  * It defines following symbols, which code can use without definition:
10  * __exidx_start
11  * __exidx_end
12  * __etext
13  * __data_start__
14  * __preinit_array_start
15  * __preinit_array_end
16  * __init_array_start
17  * __init_array_end
18  * __fini_array_start
19  * __fini_array_end
20  * __data_end__
21  * __bss_start__
22  * __bss_end__
23  * __end__
24  * end
25  * __HeapLimit
26  * __StackLimit
27  * __StackTop
28  * __stack
29  */
31 
32 SECTIONS
33 {
34  .text :
35  {
36  KEEP(*(.isr_vector))
37  *(.text*)
38 
39  KEEP(*(.init))
40  KEEP(*(.fini))
41 
42  /* .ctors */
43  *crtbegin.o(.ctors)
44  *crtbegin?.o(.ctors)
45  *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
46  *(SORT(.ctors.*))
47  *(.ctors)
48 
49  /* .dtors */
50  *crtbegin.o(.dtors)
51  *crtbegin?.o(.dtors)
52  *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
53  *(SORT(.dtors.*))
54  *(.dtors)
55 
56  *(.rodata*)
57 
58  KEEP(*(.eh_frame*))
59  } > RAM AT >FLASH
60 
61  .ARM.extab :
62  {
63  *(.ARM.extab* .gnu.linkonce.armextab.*)
64  } > RAM AT >FLASH
65 
66  __exidx_start = .;
67  .ARM.exidx :
68  {
69  *(.ARM.exidx* .gnu.linkonce.armexidx.*)
70  } > RAM AT >FLASH
71  __exidx_end = .;
72 
73  __etext = .;
74 
75  .data : AT (__etext)
76  {
77  __data_start__ = .;
78  *(vtable)
79  *(.data*)
80 
81  . = ALIGN(4);
82  /* preinit data */
83  PROVIDE_HIDDEN (__preinit_array_start = .);
84  KEEP(*(.preinit_array))
85  PROVIDE_HIDDEN (__preinit_array_end = .);
86 
87  . = ALIGN(4);
88  /* init data */
89  PROVIDE_HIDDEN (__init_array_start = .);
90  KEEP(*(SORT(.init_array.*)))
91  KEEP(*(.init_array))
92  PROVIDE_HIDDEN (__init_array_end = .);
93 
94 
95  . = ALIGN(4);
96  /* finit data */
97  PROVIDE_HIDDEN (__fini_array_start = .);
98  KEEP(*(SORT(.fini_array.*)))
99  KEEP(*(.fini_array))
100  PROVIDE_HIDDEN (__fini_array_end = .);
101 
102  . = ALIGN(4);
103  /* All data end */
104  __data_end__ = .;
105 
106  } > RAM
107 
108  .bss :
109  {
110  __bss_start__ = .;
111  *(.bss*)
112  *(COMMON)
113  __bss_end__ = .;
114  } > RAM
115 
116  .heap :
117  {
118  __end__ = .;
119  end = __end__;
120  *(.heap*)
121  __HeapLimit = .;
122  } > RAM
123 
124  /* .stack_dummy section doesn't contains any symbols. It is only
125  * used for linker to calculate size of stack sections, and assign
126  * values to stack symbols later */
127  .stack_dummy :
128  {
129  *(.stack)
130  } > RAM
131 
132  /* Set stack top to end of RAM, and stack limit move down by
133  * size of stack_dummy section */
134  __StackTop = ORIGIN(RAM) + LENGTH(RAM);
135  __StackLimit = __StackTop - SIZEOF(.stack_dummy);
136  PROVIDE(__stack = __StackTop);
137 
138  /* Check if data + heap + stack exceeds RAM limit */
139  ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
140 
141  .ram2_sect (NOLOAD):
142  {
143  *(.usbram*)
144  *(.usb_ram*)
145  *(.USB_RAM*)
146 
147  *(.ethram*)
148  *(.eth_ram*)
149  *(.eth_RAM*)
150  }>RAM2
151 
152 
153 }