Skip to content

Commit

Permalink
fix linker script bug using ALL of RAM (#1872)
Browse files Browse the repository at this point in the history
  • Loading branch information
kilograham authored Aug 27, 2024
1 parent d639292 commit dd4aacb
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 28 deletions.
7 changes: 3 additions & 4 deletions src/rp2_common/pico_crt0/rp2040/memmap_blocked_ram.ld
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,10 @@ SECTIONS
__end__ = .;
end = __end__;
KEEP(*(.heap*))
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
. = ORIGIN(RAM) + LENGTH(RAM);
__HeapLimit = .;
} > RAM
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);

/* Start and end symbols must be word-aligned */
.scratch_x : {
Expand Down
7 changes: 3 additions & 4 deletions src/rp2_common/pico_crt0/rp2040/memmap_copy_to_ram.ld
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,10 @@ SECTIONS
__end__ = .;
end = __end__;
KEEP(*(.heap*))
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
. = ORIGIN(RAM) + LENGTH(RAM);
__HeapLimit = .;
} > RAM
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);

/* Start and end symbols must be word-aligned */
.scratch_x : {
Expand Down
7 changes: 3 additions & 4 deletions src/rp2_common/pico_crt0/rp2040/memmap_default.ld
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,10 @@ SECTIONS
__end__ = .;
end = __end__;
KEEP(*(.heap*))
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
. = ORIGIN(RAM) + LENGTH(RAM);
__HeapLimit = .;
} > RAM
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);

/* Start and end symbols must be word-aligned */
.scratch_x : {
Expand Down
7 changes: 3 additions & 4 deletions src/rp2_common/pico_crt0/rp2040/memmap_no_flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,10 @@ SECTIONS
__end__ = .;
end = __end__;
KEEP(*(.heap*))
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
. = ORIGIN(RAM) + LENGTH(RAM);
__HeapLimit = .;
} > RAM
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);

/* Start and end symbols must be word-aligned */
.scratch_x : {
Expand Down
7 changes: 3 additions & 4 deletions src/rp2_common/pico_crt0/rp2350/memmap_copy_to_ram.ld
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,10 @@ SECTIONS
__end__ = .;
end = __end__;
KEEP(*(.heap*))
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
. = ORIGIN(RAM) + LENGTH(RAM);
__HeapLimit = .;
} > RAM
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);

/* Start and end symbols must be word-aligned */
.scratch_x : {
Expand Down
7 changes: 3 additions & 4 deletions src/rp2_common/pico_crt0/rp2350/memmap_default.ld
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,10 @@ SECTIONS
__end__ = .;
end = __end__;
KEEP(*(.heap*))
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
. = ORIGIN(RAM) + LENGTH(RAM);
__HeapLimit = .;
} > RAM
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);

/* Start and end symbols must be word-aligned */
.scratch_x : {
Expand Down
7 changes: 3 additions & 4 deletions src/rp2_common/pico_crt0/rp2350/memmap_no_flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,10 @@ SECTIONS
__end__ = .;
end = __end__;
KEEP(*(.heap*))
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
. = ORIGIN(RAM) + LENGTH(RAM);
__HeapLimit = .;
} > RAM
/* historically on GCC sbrk was growing past __HeapLimit to __StackLimit, however
to be more compatible, we now set __HeapLimit explicitly to where the end of the heap is */
__HeapLimit = ORIGIN(RAM) + LENGTH(RAM);

/* Start and end symbols must be word-aligned */
.scratch_x : {
Expand Down

0 comments on commit dd4aacb

Please sign in to comment.