mirror of https://github.com/Nonannet/copapy.git
Manual stencil build scripts for TriCore architecture added
This commit is contained in:
parent
decdbeb270
commit
34834faac7
|
|
@ -9,8 +9,9 @@ if not "%ARCH%"=="x86" ^
|
||||||
if not "%ARCH%"=="arm64" ^
|
if not "%ARCH%"=="arm64" ^
|
||||||
if not "%ARCH%"=="arm-v6" ^
|
if not "%ARCH%"=="arm-v6" ^
|
||||||
if not "%ARCH%"=="arm-v7" ^
|
if not "%ARCH%"=="arm-v7" ^
|
||||||
|
if not "%ARCH%"=="tricore" ^
|
||||||
if not "%ARCH%"=="all" (
|
if not "%ARCH%"=="all" (
|
||||||
echo Usage: %0 [x86_64^|x86^|arm64^|arm-v6^|arm-v7^|all]
|
echo Usage: %0 [x86_64^|x86^|arm64^|arm-v6^|arm-v7^|tricore^|all]
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -81,6 +82,29 @@ wsl i686-linux-gnu-objdump -d -x src/copapy/obj/stencils_x86_O3.o > build/stenci
|
||||||
|
|
||||||
:SKIP_X86
|
:SKIP_X86
|
||||||
|
|
||||||
|
REM ============================================================
|
||||||
|
REM TRICORE
|
||||||
|
REM ============================================================
|
||||||
|
if "%ARCH%"=="tricore" goto BUILD_TRICORE
|
||||||
|
if "%ARCH%"=="all" goto BUILD_TRICORE
|
||||||
|
goto SKIP_TRICORE
|
||||||
|
|
||||||
|
:BUILD_TRICORE
|
||||||
|
echo --------------tricore----------------
|
||||||
|
REM https://github.com/NoMore201/tricore-gcc-toolchain/releases/download/11.3.1-20250101/tricore-gcc-11.3.1-20250101-linux.zip
|
||||||
|
REM -foptimize-sibling-calls forces TCO
|
||||||
|
wsl /opt/tricore/bin/tricore-elf-gcc -fno-pic -ffunction-sections ^
|
||||||
|
-c build/stencils/stencils.c -O3 -foptimize-sibling-calls -o build/stencils/stencils.o
|
||||||
|
|
||||||
|
wsl /opt/tricore/bin/tricore-elf-ld -r build/stencils/stencils.o ^
|
||||||
|
$(/opt/tricore/bin/tricore-elf-gcc -print-libgcc-file-name) ^
|
||||||
|
$(/opt/tricore/bin/tricore-elf-gcc -print-file-name=libm.a) ^
|
||||||
|
-o src/copapy/obj/stencils_tricore_O3.o
|
||||||
|
|
||||||
|
wsl /opt/tricore/bin/tricore-elf-objdump -d -x src/copapy/obj/stencils_tricore_O3.o > build/stencils/stencils_tricore_O3.asm
|
||||||
|
|
||||||
|
:SKIP_TRICORE
|
||||||
|
|
||||||
REM ============================================================
|
REM ============================================================
|
||||||
REM ARM64
|
REM ARM64
|
||||||
REM ============================================================
|
REM ============================================================
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ set -eu
|
||||||
ARCH=${1:-x86_64}
|
ARCH=${1:-x86_64}
|
||||||
|
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
(x86_64|arm64|arm-v6|arm-v7|arm-v7-thumb|arm-v7m-thumb|all)
|
(x86_64|arm64|arm-v6|arm-v7|arm-v7-thumb|arm-v7m-thumb|tricore|all)
|
||||||
;;
|
;;
|
||||||
(*)
|
(*)
|
||||||
echo "Usage: $0 [x86_64|arm64|arm-v6|arm-v7|arm-v6-thumb|arm-v7m-thumb|all]"
|
echo "Usage: $0 [x86_64|arm64|arm-v6|arm-v7|arm-v6-thumb|arm-v7m-thumb|tricore|all]"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -206,4 +206,29 @@ if [[ "$ARCH" == "arm-v7m-thumb" || "$ARCH" == "all" ]]; then
|
||||||
src/coparun/coparun.c \
|
src/coparun/coparun.c \
|
||||||
src/coparun/mem_man.c \
|
src/coparun/mem_man.c \
|
||||||
-o build/runner/coparun-armv7thumb
|
-o build/runner/coparun-armv7thumb
|
||||||
|
fi
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# TRICORE
|
||||||
|
#######################################
|
||||||
|
if [[ "$ARCH" == "tricore" || "$ARCH" == "all" ]]; then
|
||||||
|
echo "--------------tricore----------------"
|
||||||
|
|
||||||
|
# https://github.com/NoMore201/tricore-gcc-toolchain/releases/download/11.3.1-20250101/tricore-gcc-11.3.1-20250101-linux.zip
|
||||||
|
# -foptimize-sibling-calls forces TCO
|
||||||
|
LIBGCC=$(tricore-elf-gcc -print-libgcc-file-name)
|
||||||
|
LIBM=$(tricore-elf-gcc -print-file-name=libm.a)
|
||||||
|
|
||||||
|
tricore-elf-gcc -fno-pic -ffunction-sections \
|
||||||
|
-c $SRC -O3 -foptimize-sibling-calls -o build/stencils/stencils.o
|
||||||
|
|
||||||
|
tricore-elf-ld -r \
|
||||||
|
build/stencils/stencils.o \
|
||||||
|
$LIBGCC \
|
||||||
|
$LIBM \
|
||||||
|
-o $DEST/stencils_tricore_O3.o
|
||||||
|
|
||||||
|
tricore-elf-objdump -d -x \
|
||||||
|
$DEST/stencils_tricore_O3.o \
|
||||||
|
> build/stencils/stencils_tricore_O3.asm
|
||||||
fi
|
fi
|
||||||
Loading…
Reference in New Issue