1
1
/*
2
- *****************************************************************************
2
+ ******************************************************************************
3
3
**
4
4
5
5
** File : LinkerScript.ld
14
14
**
15
15
** Target : STMicroelectronics STM32
16
16
**
17
- **
18
- ** Distribution : The file is distributed as is, without any warranty
17
+ ** Distribution : The file is distributed “as is,” without any warranty
19
18
** of any kind.
20
19
**
21
20
*****************************************************************************
22
21
** @attention
23
22
**
24
- ** <h2><center>© COPYRIGHT(c) 2014 Ac6 </center></h2>
23
+ ** <h2><center>© COPYRIGHT(c) 2019 STMicroelectronics </center></h2>
25
24
**
26
25
** Redistribution and use in source and binary forms, with or without modification,
27
26
** are permitted provided that the following conditions are met :
30
29
** 2. Redistributions in binary form must reproduce the above copyright notice,
31
30
** this list of conditions and the following disclaimer in the documentation
32
31
** and/or other materials provided with the distribution.
33
- ** 3. Neither the name of Ac6 nor the names of its contributors
32
+ ** 3. Neither the name of STMicroelectronics nor the names of its contributors
34
33
** may be used to endorse or promote products derived from this software
35
34
** without specific prior written permission.
36
35
**
@@ -61,6 +60,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
61
60
MEMORY
62
61
{
63
62
RAM (xrw ) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE
63
+ CCMRAM (xrw ) : ORIGIN = 0x10000000, LENGTH = 64K
64
64
FLASH (rx ) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET
65
65
}
66
66
@@ -76,7 +76,7 @@ SECTIONS
76
76
} >FLASH
77
77
78
78
/* The program code and other data goes into FLASH */
79
- .text ALIGN (4) :
79
+ .text :
80
80
{
81
81
. = ALIGN (4);
82
82
*(.text) /* .text sections (code) */
@@ -133,7 +133,7 @@ SECTIONS
133
133
_sidata = LOADADDR (.data);
134
134
135
135
/* Initialized data sections goes into RAM, load LMA copy after code */
136
- .data :
136
+ .data :
137
137
{
138
138
. = ALIGN (4);
139
139
_sdata = .; /* create a global symbol at data start */
@@ -144,7 +144,26 @@ SECTIONS
144
144
_edata = .; /* define a global symbol at data end */
145
145
} >RAM AT> FLASH
146
146
147
-
147
+ _siccmram = LOADADDR (.ccmram);
148
+
149
+ /* CCM-RAM section
150
+ *
151
+ * IMPORTANT NOTE!
152
+ * If initialized variables will be placed in this section,
153
+ * the startup code needs to be modified to copy the init-values.
154
+ */
155
+ .ccmram :
156
+ {
157
+ . = ALIGN (4);
158
+ _sccmram = .; /* create a global symbol at ccmram start */
159
+ *(.ccmram)
160
+ *(.ccmram*)
161
+
162
+ . = ALIGN (4);
163
+ _eccmram = .; /* create a global symbol at ccmram end */
164
+ } >CCMRAM AT> FLASH
165
+
166
+
148
167
/* Uninitialized data section */
149
168
. = ALIGN (4);
150
169
.bss :
@@ -172,7 +191,7 @@ SECTIONS
172
191
. = ALIGN (8);
173
192
} >RAM
174
193
175
-
194
+
176
195
177
196
/* Remove information from the standard libraries */
178
197
/DISCARD/ :
0 commit comments