From 2006297ee20d37652556f84ba105283a29b82c8c Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Tue, 24 Oct 2023 15:28:58 +0300 Subject: [PATCH] Scripts: Testbench: Add xt-testbench build for MTL with xt-clang Build for MTL needs other compiler xt-clang, so the COMPILER is set by default to xt-xcc and changed for MTL in set_xtensa_params.sh where also core and tools version is defined. Signed-off-by: Seppo Ingalsuo --- scripts/rebuild-testbench.sh | 4 ++-- scripts/set_xtensa_params.sh | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/rebuild-testbench.sh b/scripts/rebuild-testbench.sh index bc70456f9..1e5fe7e46 100755 --- a/scripts/rebuild-testbench.sh +++ b/scripts/rebuild-testbench.sh @@ -57,6 +57,7 @@ setup_xtensa_tools_build() BUILD_TYPE=xt BUILD_TARGET= BUILD_DIR_NAME=build_xt_testbench + COMPILER="xt-xcc" # check needed environment variables test -n "${XTENSA_TOOLS_ROOT}" || die "XTENSA_TOOLS_ROOT need to be set.\n" @@ -72,11 +73,10 @@ setup_xtensa_tools_build() test -n "${XTENSA_CORE}" || die "Illegal platform $BUILD_PLATFORM, no XTENSA_CORE found.\n" - compiler="xt-xcc" install_bin=install/tools/$XTENSA_TOOLS_VERSION/XtensaTools/bin tools_bin=$XTENSA_TOOLS_ROOT/$install_bin testbench_sections="-Wl,--sections-placement $BUILD_TESTBENCH_DIR/testbench_xcc_sections.txt" - export CC=$tools_bin/$compiler + export CC=$tools_bin/$COMPILER export LD=$tools_bin/xt-ld export OBJDUMP=$tools_bin/xt-objdump export LDFLAGS="-mlsp=sim $testbench_sections" diff --git a/scripts/set_xtensa_params.sh b/scripts/set_xtensa_params.sh index 1dbd7018c..169e9c15a 100644 --- a/scripts/set_xtensa_params.sh +++ b/scripts/set_xtensa_params.sh @@ -81,4 +81,10 @@ case "$platform" in HOST="xtensa-mt8195-elf" XTENSA_TOOLS_VERSION="RI-2019.1-linux" ;; + mtl) + PLATFORM="mtl" + XTENSA_CORE="ace10_LX7HiFi4_2022_10" + XTENSA_TOOLS_VERSION="RI-2022.10-linux" + COMPILER="xt-clang" + ;; esac