Skip to content

Commit 51d8fbd

Browse files
committed
Arm backend: Move the portable kernels section to bigger memory
This patch moves the portable kernels from the ITCM to the BRAM so that we don't overflow on the ITCM when linking the application Change-Id: Ib6dd5fc97a0fa1138b7702cb23052a7015ff4135
1 parent b0dda93 commit 51d8fbd

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From 81f5bd9092bc25c343d8d85b692698c6d961d0bd Mon Sep 17 00:00:00 2001
2+
From: George Gekov <[email protected]>
3+
Date: Mon, 28 Jul 2025 15:23:50 +0100
4+
Subject: [PATCH] Move the portable kernels to the BRAM
5+
6+
On the Corstone-300, we have 512KB of ITCM and by default,
7+
the .text section lives in the ITCM. However, as we build more
8+
portable kernels, we sometimes overflow and the .text section
9+
no longer fits in the ITCM. This patch moves the portable kernels
10+
to the BRAM as we have 1MB of BRAM
11+
---
12+
targets/corstone-300/platform.ld | 7 ++++++-
13+
1 file changed, 6 insertions(+), 1 deletion(-)
14+
15+
diff --git a/targets/corstone-300/platform.ld b/targets/corstone-300/platform.ld
16+
index 5043be2..399e9f7 100644
17+
--- a/targets/corstone-300/platform.ld
18+
+++ b/targets/corstone-300/platform.ld
19+
@@ -135,7 +135,11 @@ SECTIONS
20+
{
21+
_vectors = .;
22+
KEEP(*(.vectors))
23+
- *(.text*)
24+
+ *(EXCLUDE_FILE(
25+
+ *op_*.cpp.obj
26+
+ )
27+
+
28+
+ .text*)
29+
30+
KEEP(*(.init))
31+
KEEP(*(.fini))
32+
@@ -299,6 +303,7 @@ SECTIONS
33+
__sram_data_start__ = .;
34+
*(.sram.data)
35+
. = ALIGN(4);
36+
+ *op_*.cpp.obj (*.text*)
37+
__sram_data_end__ = .;
38+
} > BRAM AT >DDR :rom_dram
39+
40+
--
41+
2.39.5 (Apple Git-154)
42+

0 commit comments

Comments
 (0)