File tree Expand file tree Collapse file tree 5 files changed +39
-3
lines changed
libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC408X Expand file tree Collapse file tree 5 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ extern "C" {
11
11
12
12
#include < rt_misc.h>
13
13
#include < stdint.h>
14
+ #include " sys_helper.h"
14
15
15
16
extern char Image$$RW_IRAM1$$ZI$$Limit[];
16
17
@@ -22,7 +23,7 @@ extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_
22
23
23
24
struct __initial_stackheap r;
24
25
r.heap_base = zi_limit;
25
- r.heap_limit = sp_limit;
26
+ r.heap_limit = sp_limit - __reserved_stack_size () ;
26
27
return r;
27
28
}
28
29
Original file line number Diff line number Diff line change
1
+ /* mbed Microcontroller Library - stackheap
2
+ * Copyright (C) 2009-2011 ARM Limited. All rights reserved.
3
+ *
4
+ */
5
+
6
+ #include " sys_helper.h"
7
+
8
+ /* This function specifies the amount of memory of the internal RAM to
9
+ reserve for the stack. The default implementation will reserve 0 bytes
10
+ which gives the normal behaviour where the stack and heap share all the
11
+ internal RAM.
12
+
13
+ You can override this function in your code to reserve a number of bytes
14
+ for the stack.
15
+ */
16
+ extern " C" __attribute__((weak)) uint32_t __reserved_stack_size ();
17
+ extern " C" __attribute__((weak)) uint32_t __reserved_stack_size () {
18
+ return 0 ; // return 0 to indicate that nothing is reserved
19
+ }
Original file line number Diff line number Diff line change
1
+ #ifndef SYS_HELPER_H
2
+ #define SYS_HELPER_H
3
+
4
+ #include <stdint.h>
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ uint32_t __reserved_stack_size ();
11
+
12
+ #ifdef __cplusplus
13
+ }
14
+ #endif
15
+
16
+ #endif
Original file line number Diff line number Diff line change 4
4
MEMORY
5
5
{
6
6
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K
7
- RAM (rwx) : ORIGIN = 0x100000E8, LENGTH = (32K - 0xE8)
7
+ RAM (rwx) : ORIGIN = 0x100000E8, LENGTH = (64K - 0xE8)
8
8
9
9
USB_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 16K
10
10
ETH_RAM (rwx) : ORIGIN = 0x20004000, LENGTH = 16K
Original file line number Diff line number Diff line change 21
21
</DaveTm >
22
22
23
23
<Target >
24
- <TargetName >mbed NXP LPC1768 </TargetName >
24
+ <TargetName >mbed NXP LPC4088 </TargetName >
25
25
<ToolsetNumber >0x4</ToolsetNumber >
26
26
<ToolsetName >ARM-ADS</ToolsetName >
27
27
<TargetOption >
You can’t perform that action at this time.
0 commit comments