File tree Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -63,24 +63,6 @@ SECTIONS
63
63
_ebss = .; /* define a global symbol at bss end; used by startup code and GC */
64
64
} >RAM
65
65
66
- /* this is to define the start of the heap, and make sure we have a minimum size */
67
- .heap :
68
- {
69
- . = ALIGN (4);
70
- PROVIDE ( end = . );
71
- PROVIDE ( _end = . );
72
- _heap_start = .; /* define a global symbol at heap start */
73
- . = . + _minimum_heap_size;
74
- } >RAM
75
-
76
- /* this just checks there is enough RAM for the stack */
77
- .stack :
78
- {
79
- . = ALIGN (4);
80
- . = . + _stack_size;
81
- . = ALIGN (4);
82
- } >RAM
83
-
84
66
/* Remove information from the standard libraries */
85
67
/*
86
68
/DISCARD/ :
@@ -97,4 +79,3 @@ SECTIONS
97
79
/* Define heap and stack areas */
98
80
_ram_end = ORIGIN (RAM) + LENGTH (RAM);
99
81
_estack = ORIGIN (RAM) + LENGTH (RAM);
100
- _heap_end = _ram_end - _stack_size;
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ _fs_start = _sd_size + _app_size;
10
10
_fs_end = _fs_start + _fs_size;
11
11
_app_ram_start = 0x20000000 + _sd_ram;
12
12
_app_ram_size = _ram_size - _sd_ram;
13
+ _heap_start = _ebss;
14
+ _heap_end = _ram_end - _stack_size;
15
+ _heap_size = _heap_end - _heap_start;
16
+
17
+ ASSERT (_heap_size >= _minimum_heap_size, "not enough RAM left for heap")
13
18
14
19
/* Specify the memory areas */
15
20
MEMORY
You can’t perform that action at this time.
0 commit comments