summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-05-04 22:13:14 +0700
committerhathach <[email protected]>2026-05-04 22:13:14 +0700
commit076fd79b4c16b7435060585c0337bc69133e073f (patch)
treec8ae44aafd34a63eed8512c22c626e10e49bc476
parent77258a35ef2dcddef4f62bc51d31b9beef3b46d2 (diff)
Adjust RAM configuration for nrf54h20 to optimize memory usage in video examples
-rw-r--r--hw/bsp/nrf/boards/nrf54h20dk/board.cmake3
-rw-r--r--hw/bsp/nrf/boards/nrf54h20dk/board.mk5
-rw-r--r--hw/bsp/nrf/boards/nrf54lm20dk/board.cmake5
3 files changed, 9 insertions, 4 deletions
diff --git a/hw/bsp/nrf/boards/nrf54h20dk/board.cmake b/hw/bsp/nrf/boards/nrf54h20dk/board.cmake
index fca7a56d2..8095b59fe 100644
--- a/hw/bsp/nrf/boards/nrf54h20dk/board.cmake
+++ b/hw/bsp/nrf/boards/nrf54h20dk/board.cmake
@@ -1,7 +1,8 @@
set(MCU_VARIANT nrf54h20)
function(update_board TARGET)
- # temporarily, 54h20 has multiple sram sections
+ # 32 KB primary RAM is too tight for memory-heavy examples (e.g. video YUY2
+ # framebuf). TODO: route static .bss to RAM00 (512 KB) and drop this.
target_compile_definitions(${TARGET} PUBLIC
CFG_EXAMPLE_VIDEO_READONLY
)
diff --git a/hw/bsp/nrf/boards/nrf54h20dk/board.mk b/hw/bsp/nrf/boards/nrf54h20dk/board.mk
index c49b605e8..3333a76f1 100644
--- a/hw/bsp/nrf/boards/nrf54h20dk/board.mk
+++ b/hw/bsp/nrf/boards/nrf54h20dk/board.mk
@@ -1,6 +1,11 @@
MCU_VARIANT = nrf54h20
CFLAGS += -DNRF54H20_XXAA
+# 32 KB primary RAM is too tight for memory-heavy examples (e.g. video YUY2
+# framebuf). Match the CMake build (board.cmake) — TODO: route static .bss to
+# RAM00 (512 KB) and drop this.
+CFLAGS += -DCFG_EXAMPLE_VIDEO_READONLY
+
# enable max3421 host driver for this board
MAX3421_HOST = 1
diff --git a/hw/bsp/nrf/boards/nrf54lm20dk/board.cmake b/hw/bsp/nrf/boards/nrf54lm20dk/board.cmake
index 8c2b83346..e97b8822c 100644
--- a/hw/bsp/nrf/boards/nrf54lm20dk/board.cmake
+++ b/hw/bsp/nrf/boards/nrf54lm20dk/board.cmake
@@ -2,7 +2,6 @@ set(MCU_VARIANT nrf54lm20a_enga)
set(JLINK_DEVICE NRF54LM20A_M33)
function(update_board TARGET)
- target_compile_definitions(${TARGET} PUBLIC
- CFG_EXAMPLE_VIDEO_READONLY
- )
+ # No board-specific overrides needed — primary 256 KB RAM is plenty for
+ # memory-heavy examples (video YUY2 framebuf etc.).
endfunction()