1/*
2 * linker script for STM32H750XBHx with GNU ld
3 */
4
5/* Program Entry, set to mark it as "used" and avoid gc */
6MEMORY
7{
8ROM (rx) : ORIGIN =0x90000000,LENGTH =8192k
9RAM (rw) : ORIGIN =0x24000000,LENGTH =512k
10RxDecripSection (rw) : ORIGIN =0x30040000,LENGTH =32k
11TxDecripSection (rw) : ORIGIN =0x30040060,LENGTH =32k
12RxArraySection (rw) : ORIGIN =0x30040200,LENGTH =32k
13}
14ENTRY(Reset_Handler)
15_system_stack_size = 0x400;
16
17SECTIONS
18{
19    .text :
20    {
21        . = ALIGN(4);
22        _stext = .;
23        KEEP(*(.isr_vector))            /* Startup code */
24
25        . = ALIGN(4);
26        *(.text)                        /* remaining code */
27        *(.text.*)                      /* remaining code */
28        *(.rodata)                      /* read-only data (constants) */
29        *(.rodata*)
30        *(.glue_7)
31        *(.glue_7t)
32        *(.gnu.linkonce.t*)
33
34        /* section information for finsh shell */
35        . = ALIGN(4);
36        __fsymtab_start = .;
37        KEEP(*(FSymTab))
38        __fsymtab_end = .;
39
40        . = ALIGN(4);
41        __vsymtab_start = .;
42        KEEP(*(VSymTab))
43        __vsymtab_end = .;
44
45        /* section information for utest */
46        . = ALIGN(4);
47        __rt_utest_tc_tab_start = .;
48        KEEP(*(UtestTcTab))
49        __rt_utest_tc_tab_end = .;
50
51        /* section information for at server */
52        . = ALIGN(4);
53        __rtatcmdtab_start = .;
54        KEEP(*(RtAtCmdTab))
55        __rtatcmdtab_end = .;
56        . = ALIGN(4);
57
58        /* section information for modules */
59        . = ALIGN(4);
60        __rtmsymtab_start = .;
61        KEEP(*(RTMSymTab))
62        __rtmsymtab_end = .;
63
64        /* section information for initial. */
65        . = ALIGN(4);
66        __rt_init_start = .;
67        KEEP(*(SORT(.rti_fn*)))
68        __rt_init_end = .;
69
70        . = ALIGN(4);
71
72        PROVIDE(__ctors_start__ = .);
73        KEEP (*(SORT(.init_array.*)))
74        KEEP (*(.init_array))
75        PROVIDE(__ctors_end__ = .);
76
77        . = ALIGN(4);
78
79        _etext = .;
80    } > ROM = 0
81
82    /* .ARM.exidx is sorted, so has to go in its own output section.  */
83    __exidx_start = .;
84    .ARM.exidx :
85    {
86        *(.ARM.exidx* .gnu.linkonce.armexidx.*)
87
88        /* This is used by the startup in order to initialize the .data secion */
89        _sidata = .;
90    } > ROM
91    __exidx_end = .;
92
93    /* .data section which is used for initialized data */
94
95    .data : AT (_sidata)
96    {
97        . = ALIGN(4);
98        /* This is used by the startup in order to initialize the .data secion */
99        _sdata = . ;
100
101        *(.data)
102        *(.data.*)
103        *(.gnu.linkonce.d*)
104
105
106        PROVIDE(__dtors_start__ = .);
107        KEEP(*(SORT(.dtors.*)))
108        KEEP(*(.dtors))
109        PROVIDE(__dtors_end__ = .);
110
111        . = ALIGN(4);
112        /* This is used by the startup in order to initialize the .data secion */
113        _edata = . ;
114    } >RAM
115
116    .stack :
117    {
118        . = ALIGN(4);
119        _sstack = .;
120        . = . + _system_stack_size;
121        . = ALIGN(4);
122        _estack = .;
123    } >RAM
124
125    __bss_start = .;
126    .bss :
127    {
128        . = ALIGN(4);
129        /* This is used by the startup in order to initialize the .bss secion */
130        _sbss = .;
131
132        *(.bss)
133        *(.bss.*)
134        *(COMMON)
135
136        . = ALIGN(4);
137        /* This is used by the startup in order to initialize the .bss secion */
138        _ebss = . ;
139
140        *(.bss.init)
141    } > RAM
142    __bss_end = .;
143
144    .RxDecripSection (NOLOAD) : ALIGN(4)
145    {
146    . = ALIGN(4);
147    *(.RxDecripSection)
148    *(.RxDecripSection.*)
149    . = ALIGN(4);
150    __RxDecripSection_free__ = .;
151    } > RxDecripSection
152
153    .TxDecripSection (NOLOAD) : ALIGN(4)
154    {
155    . = ALIGN(4);
156    *(.TxDecripSection)
157    *(.TxDecripSection.*)
158    . = ALIGN(4);
159    __TxDecripSection_free__ = .;
160    } > TxDecripSection
161
162    .RxArraySection (NOLOAD) : ALIGN(4)
163    {
164    . = ALIGN(4);
165    *(.RxArraySection)
166    *(.RxArraySection.*)
167    . = ALIGN(4);
168    __RxArraySection_free__ = .;
169    } > RxArraySection
170
171    _end = .;
172
173    /* Stabs debugging sections.  */
174    .stab          0 : { *(.stab) }
175    .stabstr       0 : { *(.stabstr) }
176    .stab.excl     0 : { *(.stab.excl) }
177    .stab.exclstr  0 : { *(.stab.exclstr) }
178    .stab.index    0 : { *(.stab.index) }
179    .stab.indexstr 0 : { *(.stab.indexstr) }
180    .comment       0 : { *(.comment) }
181    /* DWARF debug sections.
182     * Symbols in the DWARF debugging sections are relative to the beginning
183     * of the section so we begin them at 0.  */
184    /* DWARF 1 */
185    .debug          0 : { *(.debug) }
186    .line           0 : { *(.line) }
187    /* GNU DWARF 1 extensions */
188    .debug_srcinfo  0 : { *(.debug_srcinfo) }
189    .debug_sfnames  0 : { *(.debug_sfnames) }
190    /* DWARF 1.1 and DWARF 2 */
191    .debug_aranges  0 : { *(.debug_aranges) }
192    .debug_pubnames 0 : { *(.debug_pubnames) }
193    /* DWARF 2 */
194    .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
195    .debug_abbrev   0 : { *(.debug_abbrev) }
196    .debug_line     0 : { *(.debug_line) }
197    .debug_frame    0 : { *(.debug_frame) }
198    .debug_str      0 : { *(.debug_str) }
199    .debug_loc      0 : { *(.debug_loc) }
200    .debug_macinfo  0 : { *(.debug_macinfo) }
201    /* SGI/MIPS DWARF 2 extensions */
202    .debug_weaknames 0 : { *(.debug_weaknames) }
203    .debug_funcnames 0 : { *(.debug_funcnames) }
204    .debug_typenames 0 : { *(.debug_typenames) }
205    .debug_varnames  0 : { *(.debug_varnames) }
206}
207