Skip to content

Commit da5a1f2

Browse files
authored
Merge pull request arduino#87 from bcmi-labs/heap-limit
Fix __HeapLimit address
2 parents 372ba12 + 0fa7dff commit da5a1f2

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

variants/MINIMA/fsp.ld

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ SECTIONS
242242
__HeapBase = .;
243243
end = .;
244244
KEEP(*(.heap))
245-
__HeapLimit = .;
246245
} > RAM
247246

248247
__StackTop = ORIGIN(RAM) + LENGTH(RAM) - VECTOR_TABLE_LENGTH;
@@ -253,6 +252,8 @@ SECTIONS
253252
.stack_dummy ABSOLUTE(__StackTop - BSP_CFG_STACK_MAIN_BYTES) (NOLOAD):
254253
{
255254
. = ALIGN(8);
255+
__HeapLimit = .;
256+
__StackLimit = .;
256257
KEEP(*(.stack))
257258
KEEP(*(.stack*))
258259
__StackTopAll = .;
@@ -265,7 +266,6 @@ SECTIONS
265266
. = ABSOLUTE(RAM_START + RAM_LENGTH);
266267
} > RAM
267268

268-
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
269269
PROVIDE(__stack = __StackTop);
270270

271271
.ns_buffer (NOLOAD):

variants/MUXTO/fsp.ld

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ SECTIONS
242242
__HeapBase = .;
243243
end = .;
244244
KEEP(*(.heap))
245-
__HeapLimit = .;
246245
} > RAM
247246

248247
__StackTop = ORIGIN(RAM) + LENGTH(RAM) - VECTOR_TABLE_LENGTH;
@@ -253,6 +252,8 @@ SECTIONS
253252
.stack_dummy ABSOLUTE(__StackTop - BSP_CFG_STACK_MAIN_BYTES) (NOLOAD):
254253
{
255254
. = ALIGN(8);
255+
__HeapLimit = .;
256+
__StackLimit = .;
256257
KEEP(*(.stack))
257258
KEEP(*(.stack*))
258259
__StackTopAll = .;
@@ -265,7 +266,6 @@ SECTIONS
265266
. = ABSOLUTE(RAM_START + RAM_LENGTH);
266267
} > RAM
267268

268-
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
269269
PROVIDE(__stack = __StackTop);
270270

271271
.ns_buffer (NOLOAD):

variants/PORTENTA_C33/fsp.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ SECTIONS
449449
__HeapBase = .;
450450
end = .;
451451
KEEP(*(.heap))
452-
__HeapLimit = .;
453452
} > RAM
454453

455454
__StackTop = ORIGIN(RAM) + LENGTH(RAM) - VECTOR_TABLE_LENGTH;
@@ -460,6 +459,7 @@ SECTIONS
460459
.stack_dummy ABSOLUTE(__StackTop - BSP_CFG_STACK_MAIN_BYTES) (NOLOAD):
461460
{
462461
. = ALIGN(8);
462+
__HeapLimit = .;
463463
__StackLimit = .;
464464
KEEP(*(.stack))
465465
KEEP(*(.stack*))

variants/UNOWIFIR4/fsp.ld

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ SECTIONS
242242
__HeapBase = .;
243243
end = .;
244244
KEEP(*(.heap))
245-
__HeapLimit = .;
246245
} > RAM
247246

248247
__StackTop = ORIGIN(RAM) + LENGTH(RAM) - VECTOR_TABLE_LENGTH;
@@ -253,6 +252,8 @@ SECTIONS
253252
.stack_dummy ABSOLUTE(__StackTop - BSP_CFG_STACK_MAIN_BYTES) (NOLOAD):
254253
{
255254
. = ALIGN(8);
255+
__HeapLimit = .;
256+
__StackLimit = .;
256257
KEEP(*(.stack))
257258
KEEP(*(.stack*))
258259
__StackTopAll = .;
@@ -265,7 +266,6 @@ SECTIONS
265266
. = ABSOLUTE(RAM_START + RAM_LENGTH);
266267
} > RAM
267268

268-
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
269269
PROVIDE(__stack = __StackTop);
270270

271271
.ns_buffer (NOLOAD):

0 commit comments

Comments
 (0)