Skip to content

Commit c20ef10

Browse files
committed
cpu/kinetis_common/ldscripts: adapt for newlib module
1 parent 3d3f56c commit c20ef10

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

cpu/kinetis_common/ldscripts/kinetis-base.ld

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,16 @@ SECTIONS
205205
__end__ = .;
206206
PROVIDE(end = .);
207207

208-
. = ALIGN(4);
208+
. = ALIGN(8);
209209
HEAP_SIZE = ORIGIN(sram_u) + LENGTH(sram_u) - STACK_SIZE - .;
210-
210+
211211
.heap (NOLOAD):
212212
{
213-
_heap_start = .;
214-
PROVIDE(__heap_start = .); /*__heap_start = .; */
213+
_sheap = . ;
214+
_heap_start = _sheap;
215215
. = . + HEAP_SIZE;
216-
_heap_end = .;
217-
PROVIDE(__heap_max = .);
216+
_eheap = .;
217+
_heap_end = _eheap;
218218
} > sram_u
219219

220220
/* stack section */
@@ -227,6 +227,15 @@ SECTIONS
227227
_estack = .;
228228
} > sram_u
229229

230+
/* heap section */
231+
/*
232+
. = ALIGN(8);
233+
_sheap = . ;
234+
_heap_start = _sheap;
235+
_eheap = ORIGIN(sram_u) + LENGTH(sram_u);
236+
_heap_end = _eheap;
237+
*/
238+
230239
/* Any debugging sections */
231240
/* Stabs debugging sections. */
232241
.stab 0 : { *(.stab) }

cpu/kinetis_common/ldscripts/kinetis-noramcode.ld

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ SECTIONS
191191

192192
. = ALIGN(8);
193193
HEAP_SIZE = ORIGIN(sram) + LENGTH(sram) - STACK_SIZE - .;
194-
194+
195195
.heap (NOLOAD):
196196
{
197-
_heap_start = .;
198-
PROVIDE(__heap_start = .);
197+
_sheap = . ;
198+
_heap_start = _sheap;
199199
. = . + HEAP_SIZE;
200-
_heap_end = .;
201-
PROVIDE(__heap_max = .);
200+
_eheap = .;
201+
_heap_end = _eheap;
202202
} > sram
203203

204204
/* stack section */
@@ -207,6 +207,7 @@ SECTIONS
207207
. = ALIGN(8);
208208
_sstack = .;
209209
. = . + STACK_SIZE;
210+
. = ALIGN(8);
210211
_estack = .;
211212
} > sram
212213

0 commit comments

Comments
 (0)