Skip to content

Commit 31519ef

Browse files
author
Cruz Monrreal
authored
Merge pull request #9667 from deepikabhavnani/NXP_linker
Linker files for LPC11U68 and LPC1549 updated
2 parents a3500a3 + 80eb887 commit 31519ef

File tree

3 files changed

+42
-5
lines changed

3 files changed

+42
-5
lines changed

targets/TARGET_NXP/TARGET_LPC11U6X/device/TOOLCHAIN_GCC_ARM/TARGET_LPC11U68/LPC11U68.ld

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
* By LPCXpresso v7.2.0 [Build 153] [2014-05-19] on Sat Jun 14 15:26:54 JST 2014
99
*/
1010

11+
12+
#if !defined(MBED_BOOT_STACK_SIZE)
13+
#define MBED_BOOT_STACK_SIZE 0x400
14+
#endif
15+
16+
STACK_SIZE = MBED_BOOT_STACK_SIZE;
17+
1118
MEMORY
1219
{
1320
/* Define each memory region */
@@ -229,7 +236,32 @@ SECTIONS
229236
. = ALIGN(8) ;
230237
_end_noinit = .;
231238
} > Ram0_32
232-
239+
233240
PROVIDE(_pvHeapStart = .);
234-
PROVIDE(_vStackTop = __top_Ram0_32 - 0);
241+
.heap :
242+
{
243+
__end__ = .;
244+
end = __end__;
245+
*(.heap*)
246+
. = ORIGIN(Ram0_32) + LENGTH(Ram0_32) - STACK_SIZE;
247+
__HeapLimit = .;
248+
} > Ram0_32
249+
250+
251+
/* .stack_dummy section doesn't contains any symbols. It is only
252+
* used for linker to calculate size of stack sections, and assign
253+
* values to stack symbols later */
254+
.stack_dummy :
255+
{
256+
*(.stack)
257+
} > Ram0_32
258+
259+
/* Set stack top to end of RAM, and stack limit move down by
260+
* size of stack_dummy section */
261+
__StackTop = ORIGIN(Ram0_32) + LENGTH(Ram0_32);
262+
__StackLimit = __StackTop - STACK_SIZE;
263+
PROVIDE(__stack = __StackTop);
264+
265+
PROVIDE(__stack = __StackTop);
266+
PROVIDE(_vStackTop = __StackTop);
235267
}

targets/TARGET_NXP/TARGET_LPC15XX/device/TOOLCHAIN_GCC_ARM/LPC1549.ld

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,22 @@ SECTIONS
138138
__end__ = .;
139139
end = __end__;
140140
*(.heap*)
141+
. = ORIGIN(Ram1_16) + LENGTH(Ram1_16);
141142
__HeapLimit = .;
142-
} > Ram0_16
143+
} > Ram1_16
144+
143145

144146
/* .stack_dummy section doesn't contains any symbols. It is only
145147
* used for linker to calculate size of stack sections, and assign
146148
* values to stack symbols later */
147149
.stack_dummy :
148150
{
149151
*(.stack)
150-
} > Ram0_16
152+
} > Ram2_4
151153

152154
/* Set stack top to end of RAM, and stack limit move down by
153155
* size of stack_dummy section */
154-
__StackTop = ORIGIN(Ram0_16) + LENGTH(Ram0_16) + LENGTH(Ram1_16) + LENGTH(Ram2_4);
156+
__StackTop = ORIGIN(Ram2_4) + LENGTH(Ram2_4);
155157
__StackLimit = __StackTop - STACK_SIZE;
156158
PROVIDE(__stack = __StackTop);
157159

targets/targets.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,9 @@
515515
"SLEEP",
516516
"SPI"
517517
],
518+
"macros": [
519+
"MBED_FAULT_HANDLER_DISABLED"
520+
],
518521
"default_lib": "small",
519522
"release_versions": ["2"],
520523
"device_name": "LPC11U68JBD100"

0 commit comments

Comments
 (0)