aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld')
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld143
1 files changed, 143 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld
new file mode 100644
index 000000000..7d4c1c9e8
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/compilers/GCC/ld/STM32H755xI_M7.ld
@@ -0,0 +1,143 @@
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 * STM32H755xI (M7 side) generic setup.
19 * Flash1 is assumed to be in use for the M7 core.
20 * Flash2 is not touched and can be used by the M4 core.
21 * RAM1 and RAM2 are assumed to be in use for the M7 core.
22 * RAM3 and RAM4 are not touched and can be used by the M4 core.
23 *
24 * AXI SRAM - BSS, Data, Heap.
25 * SRAM1+SRAM2 - None.
26 * SRAM3 - NOCACHE, ETH.
27 * SRAM4 - None.
28 * DTCM-RAM - Main Stack, Process Stack.
29 * ITCM-RAM - None.
30 * BCKP SRAM - None.
31 */
32MEMORY
33{
34 flash0 (rx) : org = 0x08000000, len = 2M /* Flash bank1+bank2 */
35 flash1 (rx) : org = 0x08000000, len = 1M /* Flash bank 1 */
36 flash2 (rx) : org = 0x08100000, len = 1M /* Flash bank 2 */
37 flash3 (rx) : org = 0x00000000, len = 0
38 flash4 (rx) : org = 0x00000000, len = 0
39 flash5 (rx) : org = 0x00000000, len = 0
40 flash6 (rx) : org = 0x00000000, len = 0
41 flash7 (rx) : org = 0x00000000, len = 0
42 ram0 (wx) : org = 0x24000000, len = 512k /* AXI SRAM */
43 ram1 (wx) : org = 0x30000000, len = 256k /* AHB SRAM1+SRAM2 */
44 ram2 (wx) : org = 0x30000000, len = 288k /* AHB SRAM1+SRAM2+SRAM3 */
45 ram3 (wx) : org = 0x30040000, len = 32k /* AHB SRAM3 */
46 ram4 (wx) : org = 0x38000000, len = 64k /* AHB SRAM4 */
47 ram5 (wx) : org = 0x20000000, len = 128k /* DTCM-RAM */
48 ram6 (wx) : org = 0x00000000, len = 64k /* ITCM-RAM */
49 ram7 (wx) : org = 0x38800000, len = 4k /* BCKP SRAM */
50}
51
52/* For each data/text section two region are defined, a virtual region
53 and a load region (_LMA suffix).*/
54
55/* Flash region to be used for exception vectors.*/
56REGION_ALIAS("VECTORS_FLASH", flash1);
57REGION_ALIAS("VECTORS_FLASH_LMA", flash1);
58
59/* Flash region to be used for constructors and destructors.*/
60REGION_ALIAS("XTORS_FLASH", flash1);
61REGION_ALIAS("XTORS_FLASH_LMA", flash1);
62
63/* Flash region to be used for code text.*/
64REGION_ALIAS("TEXT_FLASH", flash1);
65REGION_ALIAS("TEXT_FLASH_LMA", flash1);
66
67/* Flash region to be used for read only data.*/
68REGION_ALIAS("RODATA_FLASH", flash1);
69REGION_ALIAS("RODATA_FLASH_LMA", flash1);
70
71/* Flash region to be used for various.*/
72REGION_ALIAS("VARIOUS_FLASH", flash1);
73REGION_ALIAS("VARIOUS_FLASH_LMA", flash1);
74
75/* Flash region to be used for RAM(n) initialization data.*/
76REGION_ALIAS("RAM_INIT_FLASH_LMA", flash1);
77
78/* RAM region to be used for Main stack. This stack accommodates the processing
79 of all exceptions and interrupts.*/
80REGION_ALIAS("MAIN_STACK_RAM", ram5);
81
82/* RAM region to be used for the process stack. This is the stack used by
83 the main() function.*/
84REGION_ALIAS("PROCESS_STACK_RAM", ram5);
85
86/* RAM region to be used for data segment.*/
87REGION_ALIAS("DATA_RAM", ram0);
88REGION_ALIAS("DATA_RAM_LMA", flash1);
89
90/* RAM region to be used for BSS segment.*/
91REGION_ALIAS("BSS_RAM", ram0);
92
93/* RAM region to be used for the default heap.*/
94REGION_ALIAS("HEAP_RAM", ram0);
95
96/* Stack rules inclusion.*/
97INCLUDE rules_stacks.ld
98
99/*===========================================================================*/
100/* Custom sections for STM32H7xx. */
101/* SRAM3 is assumed to be marked non-cacheable using MPU. */
102/*===========================================================================*/
103
104/* RAM region to be used for nocache segment.*/
105REGION_ALIAS("NOCACHE_RAM", ram3);
106
107/* RAM region to be used for eth segment.*/
108REGION_ALIAS("ETH_RAM", ram3);
109
110SECTIONS
111{
112 /* Special section for non cache-able areas.*/
113 .nocache (NOLOAD) : ALIGN(4)
114 {
115 __nocache_base__ = .;
116 *(.nocache)
117 *(.nocache.*)
118 *(.bss.__nocache_*)
119 . = ALIGN(4);
120 __nocache_end__ = .;
121 } > NOCACHE_RAM
122
123 /* Special section for Ethernet DMA non cache-able areas.*/
124 .eth (NOLOAD) : ALIGN(4)
125 {
126 __eth_base__ = .;
127 *(.eth)
128 *(.eth.*)
129 *(.bss.__eth_*)
130 . = ALIGN(4);
131 __eth_end__ = .;
132 } > ETH_RAM
133}
134
135/* Code rules inclusion.*/
136INCLUDE rules_code.ld
137
138/* Data rules inclusion.*/
139INCLUDE rules_data.ld
140
141/* Memory rules inclusion.*/
142INCLUDE rules_memory.ld
143