aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld')
-rwxr-xr-xlib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld139
1 files changed, 139 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld
new file mode 100755
index 000000000..adb2bbaf8
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H743xI.ld
@@ -0,0 +1,139 @@
1/*
2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17/*
18 * STM32H743xI generic setup.
19 *
20 * AXI SRAM - BSS, Data, Heap.
21 * SRAM1+SRAM2 - None.
22 * SRAM3 - NOCACHE, ETH.
23 * SRAM4 - None.
24 * DTCM-RAM - Main Stack, Process Stack.
25 * ITCM-RAM - None.
26 * BCKP SRAM - None.
27 */
28MEMORY
29{
30 flash0 (rx) : org = 0x08000000, len = 2M /* Flash bank1+bank2 */
31 flash1 (rx) : org = 0x08000000, len = 1M /* Flash bank 1 */
32 flash2 (rx) : org = 0x08100000, len = 1M /* Flash bank 2 */
33 flash3 (rx) : org = 0x00000000, len = 0
34 flash4 (rx) : org = 0x00000000, len = 0
35 flash5 (rx) : org = 0x00000000, len = 0
36 flash6 (rx) : org = 0x00000000, len = 0
37 flash7 (rx) : org = 0x00000000, len = 0
38 ram0 (wx) : org = 0x24000000, len = 512k /* AXI SRAM */
39 ram1 (wx) : org = 0x30000000, len = 256k /* AHB SRAM1+SRAM2 */
40 ram2 (wx) : org = 0x30000000, len = 288k /* AHB SRAM1+SRAM2+SRAM3 */
41 ram3 (wx) : org = 0x30040000, len = 32k /* AHB SRAM3 */
42 ram4 (wx) : org = 0x38000000, len = 64k /* AHB SRAM4 */
43 ram5 (wx) : org = 0x20000000, len = 128k /* DTCM-RAM */
44 ram6 (wx) : org = 0x00000000, len = 64k /* ITCM-RAM */
45 ram7 (wx) : org = 0x38800000, len = 4k /* BCKP SRAM */
46}
47
48/* For each data/text section two region are defined, a virtual region
49 and a load region (_LMA suffix).*/
50
51/* Flash region to be used for exception vectors.*/
52REGION_ALIAS("VECTORS_FLASH", flash0);
53REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
54
55/* Flash region to be used for constructors and destructors.*/
56REGION_ALIAS("XTORS_FLASH", flash0);
57REGION_ALIAS("XTORS_FLASH_LMA", flash0);
58
59/* Flash region to be used for code text.*/
60REGION_ALIAS("TEXT_FLASH", flash0);
61REGION_ALIAS("TEXT_FLASH_LMA", flash0);
62
63/* Flash region to be used for read only data.*/
64REGION_ALIAS("RODATA_FLASH", flash0);
65REGION_ALIAS("RODATA_FLASH_LMA", flash0);
66
67/* Flash region to be used for various.*/
68REGION_ALIAS("VARIOUS_FLASH", flash0);
69REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
70
71/* Flash region to be used for RAM(n) initialization data.*/
72REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
73
74/* RAM region to be used for Main stack. This stack accommodates the processing
75 of all exceptions and interrupts.*/
76REGION_ALIAS("MAIN_STACK_RAM", ram5);
77
78/* RAM region to be used for the process stack. This is the stack used by
79 the main() function.*/
80REGION_ALIAS("PROCESS_STACK_RAM", ram5);
81
82/* RAM region to be used for data segment.*/
83REGION_ALIAS("DATA_RAM", ram0);
84REGION_ALIAS("DATA_RAM_LMA", flash0);
85
86/* RAM region to be used for BSS segment.*/
87REGION_ALIAS("BSS_RAM", ram0);
88
89/* RAM region to be used for the default heap.*/
90REGION_ALIAS("HEAP_RAM", ram0);
91
92/* Stack rules inclusion.*/
93INCLUDE rules_stacks.ld
94
95/*===========================================================================*/
96/* Custom sections for STM32H7xx. */
97/* SRAM3 is assumed to be marked non-cacheable using MPU. */
98/*===========================================================================*/
99
100/* RAM region to be used for nocache segment.*/
101REGION_ALIAS("NOCACHE_RAM", ram3);
102
103/* RAM region to be used for eth segment.*/
104REGION_ALIAS("ETH_RAM", ram3);
105
106SECTIONS
107{
108 /* Special section for non cache-able areas.*/
109 .nocache (NOLOAD) : ALIGN(4)
110 {
111 __nocache_base__ = .;
112 *(.nocache)
113 *(.nocache.*)
114 *(.bss.__nocache_*)
115 . = ALIGN(4);
116 __nocache_end__ = .;
117 } > NOCACHE_RAM
118
119 /* Special section for Ethernet DMA non cache-able areas.*/
120 .eth (NOLOAD) : ALIGN(4)
121 {
122 __eth_base__ = .;
123 *(.eth)
124 *(.eth.*)
125 *(.bss.__eth_*)
126 . = ALIGN(4);
127 __eth_end__ = .;
128 } > ETH_RAM
129}
130
131/* Code rules inclusion.*/
132INCLUDE rules_code.ld
133
134/* Data rules inclusion.*/
135INCLUDE rules_data.ld
136
137/* Memory rules inclusion.*/
138INCLUDE rules_memory.ld
139