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