From 4865c4fc171d6b0eb6e2b470f123ff81e45a34f8 Mon Sep 17 00:00:00 2001 From: Richard Burton Date: Mon, 13 Nov 2023 15:21:11 +0000 Subject: Modifications to linker scripts * Change reference to all ops resolver * Added our own 'all ops resolver' * Move Labels objects out of BRAM for simple_platform * Minor fixes to documentation Signed-off-by: Richard Burton Change-Id: I8b0d66ce83287f2bc027cfc36a1f378c97755481 --- scripts/cmake/platforms/mps3/sse-300/mps3-sse-300-debug.ld | 6 +++--- .../cmake/platforms/mps3/sse-300/mps3-sse-300-release.ld | 11 +---------- scripts/cmake/platforms/simple_platform/simple_platform.sct | 3 ++- .../platforms/simple_platform/simple_platform_debug.ld | 8 +++++--- .../platforms/simple_platform/simple_platform_release.ld | 13 +++---------- 5 files changed, 14 insertions(+), 27 deletions(-) (limited to 'scripts') diff --git a/scripts/cmake/platforms/mps3/sse-300/mps3-sse-300-debug.ld b/scripts/cmake/platforms/mps3/sse-300/mps3-sse-300-debug.ld index d30d5e4..6531403 100644 --- a/scripts/cmake/platforms/mps3/sse-300/mps3-sse-300-debug.ld +++ b/scripts/cmake/platforms/mps3/sse-300/mps3-sse-300-debug.ld @@ -78,7 +78,7 @@ SECTIONS * This code is instead placed on BRAM. See comment in the BRAM * section for details. */ - *(EXCLUDE_FILE(*all_ops_resolver.o + *(EXCLUDE_FILE(*MicroMutableAllOpsResolver*.obj *hal.c.obj *_allocator.o *flatbuffer*.o @@ -245,11 +245,11 @@ SECTIONS /** * Place the all ops resolver code data here. This accounts - * for ~4k worth of saving on the ITCM load region. It is + * for ~9k worth of saving on the ITCM load region. It is * only designed to be included (by default) for the inference * runner use case. **/ - *all_ops_resolver.o (*.text*) + *MicroMutableAllOpsResolver*.obj (*.text*) . = ALIGN(4); *hal.c.obj (*.text*) . = ALIGN(4); diff --git a/scripts/cmake/platforms/mps3/sse-300/mps3-sse-300-release.ld b/scripts/cmake/platforms/mps3/sse-300/mps3-sse-300-release.ld index 0212753..c88280a 100644 --- a/scripts/cmake/platforms/mps3/sse-300/mps3-sse-300-release.ld +++ b/scripts/cmake/platforms/mps3/sse-300/mps3-sse-300-release.ld @@ -78,8 +78,7 @@ SECTIONS * This code is instead placed on BRAM. See comment in the BRAM * section for details. */ - *(EXCLUDE_FILE(*all_ops_resolver.o - *hal.c.obj + *(EXCLUDE_FILE(*hal.c.obj *_allocator.o *flatbuffer*.o *lcd*.obj @@ -235,14 +234,6 @@ SECTIONS *(.ARM.extab* .gnu.linkonce.armextab.*) . = ALIGN(4); - /** - * Place the all ops resolver code data here. This accounts - * for ~4k worth of saving on the ITCM load region. It is - * only designed to be included (by default) for the inference - * runner use case. - **/ - *all_ops_resolver.o (*.text*) - . = ALIGN(4); *hal.c.obj (*.text*) . = ALIGN(4); *_allocator.o (*.text*) diff --git a/scripts/cmake/platforms/simple_platform/simple_platform.sct b/scripts/cmake/platforms/simple_platform/simple_platform.sct index 01e1b4d..f34170e 100644 --- a/scripts/cmake/platforms/simple_platform/simple_platform.sct +++ b/scripts/cmake/platforms/simple_platform/simple_platform.sct @@ -1,4 +1,4 @@ -; SPDX-FileCopyrightText: Copyright 2021 Arm Limited and/or its affiliates +; SPDX-FileCopyrightText: Copyright 2021, 2023 Arm Limited and/or its affiliates ; SPDX-License-Identifier: Apache-2.0 ; ; Licensed under the Apache License, Version 2.0 (the "License"); @@ -99,6 +99,7 @@ LOAD_REGION_1 0x70000000 0x02000000 ; labels *.o (labels) + Labels.o (+RO-DATA) ; activation buffers a.k.a tensor arena when memory mode dedicated sram *.o (activation_buf_dram) diff --git a/scripts/cmake/platforms/simple_platform/simple_platform_debug.ld b/scripts/cmake/platforms/simple_platform/simple_platform_debug.ld index 9a4f88a..4bbe6c0 100644 --- a/scripts/cmake/platforms/simple_platform/simple_platform_debug.ld +++ b/scripts/cmake/platforms/simple_platform/simple_platform_debug.ld @@ -71,7 +71,7 @@ SECTIONS * This code is instead placed on BRAM. See comment in the BRAM * section for details. */ - *(EXCLUDE_FILE(*all_ops_resolver.o + *(EXCLUDE_FILE(*MicroMutableAllOpsResolver*.obj *hal.c.obj *_allocator.o *flatbuffer*.o @@ -189,6 +189,8 @@ SECTIONS /* labels */ *(labels) . = ALIGN (16); + *Labels*.obj (*.rodata*) + . = ALIGN (16); /* activation buffers a.k.a tensor arena when memory mode dedicated sram */ *(activation_buf_dram) . = ALIGN (16); @@ -236,11 +238,11 @@ SECTIONS /** * Place the all ops resolver code data here. This accounts - * for ~4k worth of saving on the ITCM load region. It is + * for ~9k worth of saving on the ITCM load region. It is * only designed to be included (by default) for the inference * runner use case. **/ - *all_ops_resolver.o (*.text*) + *MicroMutableAllOpsResolver*.obj (*.text*) . = ALIGN(4); *hal.c.obj (*.text*) . = ALIGN(4); diff --git a/scripts/cmake/platforms/simple_platform/simple_platform_release.ld b/scripts/cmake/platforms/simple_platform/simple_platform_release.ld index 492f6da..46b9636 100644 --- a/scripts/cmake/platforms/simple_platform/simple_platform_release.ld +++ b/scripts/cmake/platforms/simple_platform/simple_platform_release.ld @@ -71,8 +71,7 @@ SECTIONS * This code is instead placed on BRAM. See comment in the BRAM * section for details. */ - *(EXCLUDE_FILE(*all_ops_resolver.o - *hal.c.obj + *(EXCLUDE_FILE(*hal.c.obj *_allocator.o *flatbuffer*.o *lcd*.obj @@ -188,6 +187,8 @@ SECTIONS /* labels */ *(labels) . = ALIGN (16); + *Labels*.obj (*.rodata*) + . = ALIGN (16); /* activation buffers a.k.a tensor arena when memory mode dedicated sram */ *(activation_buf_dram) . = ALIGN (16); @@ -226,14 +227,6 @@ SECTIONS *(.ARM.extab* .gnu.linkonce.armextab.*) . = ALIGN(4); - /** - * Place the all ops resolver code data here. This accounts - * for ~4k worth of saving on the ITCM load region. It is - * only designed to be included (by default) for the inference - * runner use case. - **/ - *all_ops_resolver.o (*.text*) - . = ALIGN(4); *hal.c.obj (*.text*) . = ALIGN(4); *_allocator.o (*.text*) -- cgit v1.2.1