diff options
Diffstat (limited to 'lib/chibios-contrib/os/common/startup/ARMCMx/compilers/GCC/ld/NUC123xD4xx0.ld')
-rw-r--r-- | lib/chibios-contrib/os/common/startup/ARMCMx/compilers/GCC/ld/NUC123xD4xx0.ld | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/common/startup/ARMCMx/compilers/GCC/ld/NUC123xD4xx0.ld b/lib/chibios-contrib/os/common/startup/ARMCMx/compilers/GCC/ld/NUC123xD4xx0.ld new file mode 100644 index 000000000..9404db5c6 --- /dev/null +++ b/lib/chibios-contrib/os/common/startup/ARMCMx/compilers/GCC/ld/NUC123xD4xx0.ld | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | Copyright (C) 2020 Alex Lewontin | ||
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 | * NUC123xD4xx0 memory setup. | ||
19 | * 64k ROM, 20k ram | ||
20 | */ | ||
21 | MEMORY | ||
22 | { | ||
23 | flash0 (rx) : org = 0x00000000, len = 0x11000 /* APROM */ | ||
24 | flash1 (rx) : org = 0x00000000, len = 0 /* Data flash placeholder */ | ||
25 | flash2 (rx) : org = 0x00100000, len = 0x1000 /* LDROM */ | ||
26 | flash3 (rx) : org = 0x00300000, len = 4 /* Config0 */ | ||
27 | flash4 (rx) : org = 0x00300004, len = 4 /* Config1 */ | ||
28 | flash5 (rx) : org = 0x00000000, len = 0 | ||
29 | flash6 (rx) : org = 0x00000000, len = 0 | ||
30 | flash7 (rx) : org = 0x00000000, len = 0 | ||
31 | ram0 (wx) : org = 0x20000000, len = 0x5000 | ||
32 | ram1 (wx) : org = 0x00000000, len = 0 | ||
33 | ram2 (wx) : org = 0x00000000, len = 0 | ||
34 | ram3 (wx) : org = 0x00000000, len = 0 | ||
35 | ram4 (wx) : org = 0x00000000, len = 0 | ||
36 | ram5 (wx) : org = 0x00000000, len = 0 | ||
37 | ram6 (wx) : org = 0x00000000, len = 0 | ||
38 | ram7 (wx) : org = 0x00000000, len = 0 | ||
39 | } | ||
40 | |||
41 | REGION_ALIAS("CONFIG0", flash3); | ||
42 | REGION_ALIAS("CONFIG1", flash4); | ||
43 | |||
44 | SECTIONS | ||
45 | { | ||
46 | .nuc123_config0 : ALIGN(4) | ||
47 | { | ||
48 | KEEP(*(.nuc123_config0)) | ||
49 | } > CONFIG0 | ||
50 | |||
51 | .nuc123_config1 : ALIGN(4) | ||
52 | { | ||
53 | KEEP(*(.nuc123_config1)) | ||
54 | } > CONFIG1 | ||
55 | } | ||
56 | |||
57 | /* For each data/text section two region are defined, a virtual region | ||
58 | and a load region (_LMA suffix).*/ | ||
59 | |||
60 | /* Flash region to be used for exception vectors.*/ | ||
61 | REGION_ALIAS("VECTORS_FLASH", flash0); | ||
62 | REGION_ALIAS("VECTORS_FLASH_LMA", flash0); | ||
63 | |||
64 | /* Flash region to be used for constructors and destructors.*/ | ||
65 | REGION_ALIAS("XTORS_FLASH", flash0); | ||
66 | REGION_ALIAS("XTORS_FLASH_LMA", flash0); | ||
67 | |||
68 | /* Flash region to be used for code text.*/ | ||
69 | REGION_ALIAS("TEXT_FLASH", flash0); | ||
70 | REGION_ALIAS("TEXT_FLASH_LMA", flash0); | ||
71 | |||
72 | /* Flash region to be used for read only data.*/ | ||
73 | REGION_ALIAS("RODATA_FLASH", flash0); | ||
74 | REGION_ALIAS("RODATA_FLASH_LMA", flash0); | ||
75 | |||
76 | /* Flash region to be used for various.*/ | ||
77 | REGION_ALIAS("VARIOUS_FLASH", flash0); | ||
78 | REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); | ||
79 | |||
80 | /* Flash region to be used for RAM(n) initialization data.*/ | ||
81 | REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); | ||
82 | |||
83 | /* RAM region to be used for Main stack. This stack accommodates the processing | ||
84 | of all exceptions and interrupts.*/ | ||
85 | REGION_ALIAS("MAIN_STACK_RAM", ram0); | ||
86 | |||
87 | /* RAM region to be used for the process stack. This is the stack used by | ||
88 | the main() function.*/ | ||
89 | REGION_ALIAS("PROCESS_STACK_RAM", ram0); | ||
90 | |||
91 | /* RAM region to be used for data segment.*/ | ||
92 | REGION_ALIAS("DATA_RAM", ram0); | ||
93 | REGION_ALIAS("DATA_RAM_LMA", flash0); | ||
94 | |||
95 | /* RAM region to be used for BSS segment.*/ | ||
96 | REGION_ALIAS("BSS_RAM", ram0); | ||
97 | |||
98 | /* RAM region to be used for the default heap.*/ | ||
99 | REGION_ALIAS("HEAP_RAM", ram0); | ||
100 | |||
101 | /* Generic rules inclusion.*/ | ||
102 | INCLUDE rules.ld | ||