This is an automated email from the ASF dual-hosted git repository.
lupyuen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 61032a0ee13 boards/arm/rp23xx/pimoroni-pico-2-plus: fix linker scripts
100% RAM usage
61032a0ee13 is described below
commit 61032a0ee131073c254983ff21d6ba545dec5833
Author: simbit18 <[email protected]>
AuthorDate: Mon Oct 6 16:47:51 2025 +0200
boards/arm/rp23xx/pimoroni-pico-2-plus: fix linker scripts 100% RAM usage
Compiling with --print-memory-usage always shows 100% RAM
Upstream bug raspberrypi/pico-sdk#1871
Signed-off-by: simbit18 <[email protected]>
---
.../arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_copy_to_ram.ld | 7 +++----
boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_default.ld | 7 +++----
boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_no_flash.ld | 7 +++----
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git
a/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_copy_to_ram.ld
b/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_copy_to_ram.ld
index ad2a57e4d6b..8be73dbc2b3 100644
--- a/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_copy_to_ram.ld
+++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_copy_to_ram.ld
@@ -256,11 +256,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 : {
diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_default.ld
b/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_default.ld
index a6ae6625cc1..b59a2ce94a2 100644
--- a/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_default.ld
+++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_default.ld
@@ -269,11 +269,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 : {
diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_no_flash.ld
b/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_no_flash.ld
index b4d3602cce3..81dea5b79d6 100644
--- a/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_no_flash.ld
+++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/scripts/memmap_no_flash.ld
@@ -215,11 +215,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 : {