Skip to content

Commit

Permalink
Merge pull request arduino#87 from bcmi-labs/heap-limit
Browse files Browse the repository at this point in the history
Fix __HeapLimit address
  • Loading branch information
facchinm committed Jun 15, 2023
2 parents 372ba12 + 0fa7dff commit da5a1f2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions variants/MINIMA/fsp.ld
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ SECTIONS
__HeapBase = .;
end = .;
KEEP(*(.heap))
__HeapLimit = .;
} > RAM

__StackTop = ORIGIN(RAM) + LENGTH(RAM) - VECTOR_TABLE_LENGTH;
Expand All @@ -253,6 +252,8 @@ SECTIONS
.stack_dummy ABSOLUTE(__StackTop - BSP_CFG_STACK_MAIN_BYTES) (NOLOAD):
{
. = ALIGN(8);
__HeapLimit = .;
__StackLimit = .;
KEEP(*(.stack))
KEEP(*(.stack*))
__StackTopAll = .;
Expand All @@ -265,7 +266,6 @@ SECTIONS
. = ABSOLUTE(RAM_START + RAM_LENGTH);
} > RAM

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

.ns_buffer (NOLOAD):
Expand Down
4 changes: 2 additions & 2 deletions variants/MUXTO/fsp.ld
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ SECTIONS
__HeapBase = .;
end = .;
KEEP(*(.heap))
__HeapLimit = .;
} > RAM

__StackTop = ORIGIN(RAM) + LENGTH(RAM) - VECTOR_TABLE_LENGTH;
Expand All @@ -253,6 +252,8 @@ SECTIONS
.stack_dummy ABSOLUTE(__StackTop - BSP_CFG_STACK_MAIN_BYTES) (NOLOAD):
{
. = ALIGN(8);
__HeapLimit = .;
__StackLimit = .;
KEEP(*(.stack))
KEEP(*(.stack*))
__StackTopAll = .;
Expand All @@ -265,7 +266,6 @@ SECTIONS
. = ABSOLUTE(RAM_START + RAM_LENGTH);
} > RAM

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

.ns_buffer (NOLOAD):
Expand Down
2 changes: 1 addition & 1 deletion variants/PORTENTA_C33/fsp.ld
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ SECTIONS
__HeapBase = .;
end = .;
KEEP(*(.heap))
__HeapLimit = .;
} > RAM

__StackTop = ORIGIN(RAM) + LENGTH(RAM) - VECTOR_TABLE_LENGTH;
Expand All @@ -460,6 +459,7 @@ SECTIONS
.stack_dummy ABSOLUTE(__StackTop - BSP_CFG_STACK_MAIN_BYTES) (NOLOAD):
{
. = ALIGN(8);
__HeapLimit = .;
__StackLimit = .;
KEEP(*(.stack))
KEEP(*(.stack*))
Expand Down
4 changes: 2 additions & 2 deletions variants/UNOWIFIR4/fsp.ld
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ SECTIONS
__HeapBase = .;
end = .;
KEEP(*(.heap))
__HeapLimit = .;
} > RAM

__StackTop = ORIGIN(RAM) + LENGTH(RAM) - VECTOR_TABLE_LENGTH;
Expand All @@ -253,6 +252,8 @@ SECTIONS
.stack_dummy ABSOLUTE(__StackTop - BSP_CFG_STACK_MAIN_BYTES) (NOLOAD):
{
. = ALIGN(8);
__HeapLimit = .;
__StackLimit = .;
KEEP(*(.stack))
KEEP(*(.stack*))
__StackTopAll = .;
Expand All @@ -265,7 +266,6 @@ SECTIONS
. = ABSOLUTE(RAM_START + RAM_LENGTH);
} > RAM

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

.ns_buffer (NOLOAD):
Expand Down

0 comments on commit da5a1f2

Please sign in to comment.