Skip to content

Commit 4236e5b

Browse files
authored
Backends arm: Bump ethos-u/core_platform (#10514)
Bump core_platform to a newer version that includes the patch moving .rodata into DDR thus making the patch reduntant. But, lurking inside that patch was a add of .got into DDR section so that needs its own patch to be handled. Once the 0001 patch was fixed the 0002 patch needed some updates.
1 parent 7054b1f commit 4236e5b

File tree

4 files changed

+44
-55
lines changed

4 files changed

+44
-55
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From e637571ca767671d8114542d85bca7965e0a4251 Mon Sep 17 00:00:00 2001
2+
From: Per Held <[email protected]>
3+
Date: Fri, 25 Apr 2025 13:25:29 +0200
4+
Subject: [PATCH 1/2] Add got section to the DDR
5+
6+
---
7+
targets/corstone-300/platform.ld | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/targets/corstone-300/platform.ld b/targets/corstone-300/platform.ld
11+
index d586b97..b746aa0 100644
12+
--- a/targets/corstone-300/platform.ld
13+
+++ b/targets/corstone-300/platform.ld
14+
@@ -281,7 +281,7 @@ SECTIONS
15+
#endif
16+
* (expected_output_data_sec)
17+
* (sec_command_stream, sec_weight_data, sec_input_data)
18+
-
19+
+ * (.got*)
20+
* (ethosu_core_in_queue)
21+
* (ethosu_core_out_queue)
22+
. = ALIGN(4);
23+
--
24+
2.43.0
25+

examples/arm/ethos-u-setup/core_platform/0001-Move-rodata-to-the-DDR.patch

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
From 23712ff626db16793d428dddcb530f9e5faaa073 Mon Sep 17 00:00:00 2001
2-
From: Adrian Lundell <adrian.lundell@arm.com>
3-
Date: Thu, 3 Apr 2025 14:25:52 +0200
4-
Subject: [PATCH] Move input_data_sec to NOLOAD area
1+
From 42a16a7e9c73e79e55ee25534e3bbc39f169af62 Mon Sep 17 00:00:00 2001
2+
From: Per Held <per.held@arm.com>
3+
Date: Mon, 28 Apr 2025 10:56:09 +0200
4+
Subject: [PATCH 2/2] Move input_data_sec to NOLOAD area
55

66
---
77
targets/corstone-300/platform.ld | 10 ++++++++--
88
targets/corstone-320/platform.ld | 8 ++++++--
99
2 files changed, 14 insertions(+), 4 deletions(-)
1010

1111
diff --git a/targets/corstone-300/platform.ld b/targets/corstone-300/platform.ld
12-
index 1733509..3ccce64 100644
12+
index b746aa0..5043be2 100644
1313
--- a/targets/corstone-300/platform.ld
1414
+++ b/targets/corstone-300/platform.ld
15-
@@ -272,13 +272,12 @@ SECTIONS
15+
@@ -273,19 +273,25 @@ SECTIONS
1616
*(.bss.tensor_arena)
1717
#endif
18-
18+
1919
- . = ALIGN(4);
2020
- *(input_data_sec)
2121
. = ALIGN(16);
@@ -25,39 +25,38 @@ index 1733509..3ccce64 100644
2525
* (expected_output_data_sec)
2626
+ . = ALIGN(16);
2727
* (sec_command_stream, sec_weight_data, sec_input_data)
28-
*(.got*)
29-
*(.rodata*)
30-
@@ -287,6 +286,13 @@ SECTIONS
28+
* (.got*)
29+
* (ethosu_core_in_queue)
30+
* (ethosu_core_out_queue)
3131
. = ALIGN(4);
3232
} > DDR :rom_dram
33-
3433
+ .ddr_noload (NOLOAD) :
3534
+ {
3635
+ . = ALIGN(16);
3736
+ *(input_data_sec)
3837
+ . = ALIGN(16);
3938
+ } > DDR :null
4039
+
41-
__eddr_data = ALIGN (4) ;
42-
.sram.data : {
43-
__sram_data_start__ = .;
40+
41+
__eddr_data = ALIGN(4);
42+
.sram.data :
4443
diff --git a/targets/corstone-320/platform.ld b/targets/corstone-320/platform.ld
45-
index c8261c0..9b7e071 100644
44+
index 1f4f521..8c5e402 100644
4645
--- a/targets/corstone-320/platform.ld
4746
+++ b/targets/corstone-320/platform.ld
4847
@@ -268,8 +268,6 @@ SECTIONS
4948
*(network_model_sec)
5049
#endif
51-
50+
5251
- . = ALIGN(4);
5352
- *(input_data_sec)
5453
*(expected_output_data_sec)
5554
*(output_data_sec)
56-
55+
5756
@@ -279,6 +277,12 @@ SECTIONS
5857
__etext = .;
5958
} > DDR :rom_dram
60-
59+
6160
+ .ddr_noload (NOLOAD) :
6261
+ {
6362
+ . = ALIGN(16);
@@ -67,6 +66,6 @@ index c8261c0..9b7e071 100644
6766
.bss :
6867
{
6968
. = ALIGN(4);
70-
--
69+
--
7170
2.43.0
7271

examples/arm/executor_runner/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ if(FETCH_ETHOS_U_CONTENT)
7575
endif()
7676

7777
# Always patch the core_platform repo since this is fast enough.
78-
set(core_platform_base_rev "b728c774158248ba2cad8e78a515809e1eb9b77f")
78+
set(core_platform_base_rev "1916a9c984819c35b19c9e5c4c80d47e4e866420")
7979
set(patch_dir "${ET_DIR_PATH}/examples/arm/ethos-u-setup")
8080
execute_process(COMMAND bash -c "pwd && source backends/arm/scripts/utils.sh && patch_repo ${ETHOS_SDK_PATH}/core_platform ${core_platform_base_rev} ${patch_dir}"
8181
WORKING_DIRECTORY ${ET_DIR_PATH}

0 commit comments

Comments
 (0)