Skip to content

Commit c1172af

Browse files
committed
added all regions of memory for the lpc1788
1 parent 0c420b7 commit c1172af

File tree

1 file changed

+66
-9
lines changed

1 file changed

+66
-9
lines changed

targets/chip/lpc1788/linkerscript.ld

Lines changed: 66 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OUTPUT_ARCH(arm);
1010
/*
1111
The stack size used by the application. NOTE: you need to adjust according to your application.
1212
*/
13-
STACK_SIZE = 0x4000;
13+
STACK_SIZE = 0x2000;
1414

1515
/*
1616
Memories definitions
@@ -20,6 +20,18 @@ MEMORY
2020
rom (rx) : org = 0x00000000, len = 512k
2121
ram (rwx) : org = 0x10000000, len = 64k
2222
ram1 (rwx) : org = 0x20000000, len = 32k
23+
24+
/* static memory regions, len is the maximum. Not the actual size */
25+
static0 (rwx) : org = 0x80000000, len = 256m
26+
static1 (rwx) : org = 0x90000000, len = 128m
27+
static2 (rwx) : org = 0x98000000, len = 64m
28+
static3 (rwx) : org = 0x9c000000, len = 64m
29+
30+
/* dynamic memory regions, len is the maximum. Not the actual size */
31+
dynamic0 (rwx) : org = 0xa0000000, len = 256m
32+
dynamic1 (rwx) : org = 0xb0000000, len = 256m
33+
dynamic2 (rwx) : org = 0xc0000000, len = 256m
34+
dynamic3 (rwx) : org = 0xd0000000, len = 256m
2335
}
2436

2537
/*
@@ -171,17 +183,62 @@ SECTIONS
171183
PROVIDE(__bss_end = .);
172184
} > ram
173185

174-
.periph :
186+
/* additional ram segment of the lpc1788 */
187+
.ram1 :
175188
{
176-
. = ALIGN(4);
177-
PROVIDE(__periph_start = .);
189+
*(SORT_BY_ALIGNMENT(.ram1))
190+
*(SORT_BY_ALIGNMENT(.ram1.*))
191+
} > ram1
178192

179-
*(SORT_BY_ALIGNMENT(.periph))
180-
*(SORT_BY_ALIGNMENT(.periph.*))
181-
. = ALIGN(4);
193+
/* static memory, note: not loaded by default. No startup code loads the segments */
194+
.static0 (NOLOAD) :
195+
{
196+
*(SORT_BY_ALIGNMENT(.static0));
197+
*(SORT_BY_ALIGNMENT(.static0.*));
198+
} > static0
182199

183-
PROVIDE(__periph_end = .);
184-
} > ram1
200+
.static1 (NOLOAD) :
201+
{
202+
*(SORT_BY_ALIGNMENT(.static1));
203+
*(SORT_BY_ALIGNMENT(.static1.*));
204+
} > static1
205+
206+
.static2 (NOLOAD) :
207+
{
208+
*(SORT_BY_ALIGNMENT(.static2));
209+
*(SORT_BY_ALIGNMENT(.static2.*));
210+
} > static2
211+
212+
.static3 (NOLOAD) :
213+
{
214+
*(SORT_BY_ALIGNMENT(.static3));
215+
*(SORT_BY_ALIGNMENT(.static3.*));
216+
} > static3
217+
218+
/* dynamic memory, note: not loaded by default. No startup code loads the segments */
219+
.dynamic0 (NOLOAD) :
220+
{
221+
*(SORT_BY_ALIGNMENT(.dynamic0));
222+
*(SORT_BY_ALIGNMENT(.dynamic0.*));
223+
} > dynamic0
224+
225+
.dynamic1 (NOLOAD) :
226+
{
227+
*(SORT_BY_ALIGNMENT(.dynamic1));
228+
*(SORT_BY_ALIGNMENT(.dynamic1.*));
229+
} > dynamic1
230+
231+
.dynamic2 (NOLOAD) :
232+
{
233+
*(SORT_BY_ALIGNMENT(.dynamic2));
234+
*(SORT_BY_ALIGNMENT(.dynamic2.*));
235+
} > dynamic2
236+
237+
.dynamic3 (NOLOAD) :
238+
{
239+
*(SORT_BY_ALIGNMENT(.dynamic3));
240+
*(SORT_BY_ALIGNMENT(.dynamic3.*));
241+
} > dynamic3
185242

186243
/* Heap segment */
187244
.heap (NOLOAD) :

0 commit comments

Comments
 (0)