diff --git a/examples/arm/ethos-u-setup/core_platform/0001-Add-got-section-to-the-DDR.patch b/examples/arm/ethos-u-setup/core_platform/0001-Add-got-section-to-the-DDR.patch new file mode 100644 index 00000000000..f2088f3c933 --- /dev/null +++ b/examples/arm/ethos-u-setup/core_platform/0001-Add-got-section-to-the-DDR.patch @@ -0,0 +1,25 @@ +From e637571ca767671d8114542d85bca7965e0a4251 Mon Sep 17 00:00:00 2001 +From: Per Held +Date: Fri, 25 Apr 2025 13:25:29 +0200 +Subject: [PATCH 1/2] Add got section to the DDR + +--- + targets/corstone-300/platform.ld | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/targets/corstone-300/platform.ld b/targets/corstone-300/platform.ld +index d586b97..b746aa0 100644 +--- a/targets/corstone-300/platform.ld ++++ b/targets/corstone-300/platform.ld +@@ -281,7 +281,7 @@ SECTIONS + #endif + * (expected_output_data_sec) + * (sec_command_stream, sec_weight_data, sec_input_data) +- ++ * (.got*) + * (ethosu_core_in_queue) + * (ethosu_core_out_queue) + . = ALIGN(4); +-- +2.43.0 + diff --git a/examples/arm/ethos-u-setup/core_platform/0001-Move-rodata-to-the-DDR.patch b/examples/arm/ethos-u-setup/core_platform/0001-Move-rodata-to-the-DDR.patch deleted file mode 100644 index 9b47aa4e3a7..00000000000 --- a/examples/arm/ethos-u-setup/core_platform/0001-Move-rodata-to-the-DDR.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0fb46c2fe4a072546f87c6cb9202d5001f1eb9c5 Mon Sep 17 00:00:00 2001 -From: George Gekov -Date: Mon, 18 Nov 2024 11:24:11 +0000 -Subject: [PATCH] Move rodata to the DDR - ---- - targets/corstone-300/platform.ld | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/targets/corstone-300/platform.ld b/targets/corstone-300/platform.ld -index b458fc6..8d4bc73 100644 ---- a/targets/corstone-300/platform.ld -+++ b/targets/corstone-300/platform.ld -@@ -154,7 +154,7 @@ SECTIONS - *(SORT(.dtors.*)) - *(.dtors) - -- *(.rodata*) -+ - - KEEP(*(.eh_frame*)) - } > ITCM :rom_exec -@@ -280,7 +280,8 @@ SECTIONS - #endif - * (expected_output_data_sec) - * (sec_command_stream, sec_weight_data, sec_input_data) -- -+ *(.got*) -+ *(.rodata*) - * (ethosu_core_in_queue) - * (ethosu_core_out_queue) - . = ALIGN(4); --- -2.25.1 - diff --git a/examples/arm/ethos-u-setup/core_platform/0002-Move-input_data_sec-to-NOLOAD-area.patch b/examples/arm/ethos-u-setup/core_platform/0002-Move-input_data_sec-to-NOLOAD-area.patch index 5d1ebb6e307..e9f1c332b42 100644 --- a/examples/arm/ethos-u-setup/core_platform/0002-Move-input_data_sec-to-NOLOAD-area.patch +++ b/examples/arm/ethos-u-setup/core_platform/0002-Move-input_data_sec-to-NOLOAD-area.patch @@ -1,7 +1,7 @@ -From 23712ff626db16793d428dddcb530f9e5faaa073 Mon Sep 17 00:00:00 2001 -From: Adrian Lundell -Date: Thu, 3 Apr 2025 14:25:52 +0200 -Subject: [PATCH] Move input_data_sec to NOLOAD area +From 42a16a7e9c73e79e55ee25534e3bbc39f169af62 Mon Sep 17 00:00:00 2001 +From: Per Held +Date: Mon, 28 Apr 2025 10:56:09 +0200 +Subject: [PATCH 2/2] Move input_data_sec to NOLOAD area --- targets/corstone-300/platform.ld | 10 ++++++++-- @@ -9,13 +9,13 @@ Subject: [PATCH] Move input_data_sec to NOLOAD area 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/targets/corstone-300/platform.ld b/targets/corstone-300/platform.ld -index 1733509..3ccce64 100644 +index b746aa0..5043be2 100644 --- a/targets/corstone-300/platform.ld +++ b/targets/corstone-300/platform.ld -@@ -272,13 +272,12 @@ SECTIONS +@@ -273,19 +273,25 @@ SECTIONS *(.bss.tensor_arena) #endif - + - . = ALIGN(4); - *(input_data_sec) . = ALIGN(16); @@ -25,12 +25,11 @@ index 1733509..3ccce64 100644 * (expected_output_data_sec) + . = ALIGN(16); * (sec_command_stream, sec_weight_data, sec_input_data) - *(.got*) - *(.rodata*) -@@ -287,6 +286,13 @@ SECTIONS + * (.got*) + * (ethosu_core_in_queue) + * (ethosu_core_out_queue) . = ALIGN(4); } > DDR :rom_dram - + .ddr_noload (NOLOAD) : + { + . = ALIGN(16); @@ -38,26 +37,26 @@ index 1733509..3ccce64 100644 + . = ALIGN(16); + } > DDR :null + - __eddr_data = ALIGN (4) ; - .sram.data : { - __sram_data_start__ = .; + + __eddr_data = ALIGN(4); + .sram.data : diff --git a/targets/corstone-320/platform.ld b/targets/corstone-320/platform.ld -index c8261c0..9b7e071 100644 +index 1f4f521..8c5e402 100644 --- a/targets/corstone-320/platform.ld +++ b/targets/corstone-320/platform.ld @@ -268,8 +268,6 @@ SECTIONS *(network_model_sec) #endif - + - . = ALIGN(4); - *(input_data_sec) *(expected_output_data_sec) *(output_data_sec) - + @@ -279,6 +277,12 @@ SECTIONS __etext = .; } > DDR :rom_dram - + + .ddr_noload (NOLOAD) : + { + . = ALIGN(16); @@ -67,6 +66,6 @@ index c8261c0..9b7e071 100644 .bss : { . = ALIGN(4); --- +-- 2.43.0 diff --git a/examples/arm/executor_runner/CMakeLists.txt b/examples/arm/executor_runner/CMakeLists.txt index e944c9a06ee..63cdcc45aad 100644 --- a/examples/arm/executor_runner/CMakeLists.txt +++ b/examples/arm/executor_runner/CMakeLists.txt @@ -75,7 +75,7 @@ if(FETCH_ETHOS_U_CONTENT) endif() # Always patch the core_platform repo since this is fast enough. - set(core_platform_base_rev "b728c774158248ba2cad8e78a515809e1eb9b77f") + set(core_platform_base_rev "1916a9c984819c35b19c9e5c4c80d47e4e866420") set(patch_dir "${ET_DIR_PATH}/examples/arm/ethos-u-setup") 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}" WORKING_DIRECTORY ${ET_DIR_PATH}