aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjferreir <jesus.ferreira@gmail.com>2024-10-09 12:12:46 +0200
committerChris Packham <judge.packham@gmail.com>2024-11-10 20:14:52 +1300
commit558d67ec0df4bcdf495376629639ebaffd8b1fe6 (patch)
tree692cb57bd3c5a24ba75b9c868a8d7a1e165eacec
parent4773bd609c0f788328d6ffc36f6cc9ea8f09a95f (diff)
downloadcrosstool-ng-558d67ec0df4bcdf495376629639ebaffd8b1fe6.tar.gz
crosstool-ng-558d67ec0df4bcdf495376629639ebaffd8b1fe6.tar.bz2
crosstool-ng-558d67ec0df4bcdf495376629639ebaffd8b1fe6.zip
initial support to build tricore gcc
Add support for Tricore architecture. TriCore architecture is optimized for real-time embedded systems. More information can be found at AURIX™ TC3xx Architecture vol 1 https://www.infineon.com/dgdl/Infineon-AURIX_TC3xx_Architecture_vol1-UserManual-v01_00-EN.pdf?fileId=5546d46276fb756a01771bc4c2e33bdd Signed-off-by: jferreir <jesus.ferreira@gmail.com>
-rw-r--r--config/arch/tricore.in10
-rw-r--r--samples/tricore-none-eabi/crosstool.config29
-rw-r--r--samples/tricore-none-eabi/reported.by3
-rw-r--r--scripts/build/arch/tricore.sh9
-rwxr-xr-xscripts/config.sub1
5 files changed, 52 insertions, 0 deletions
diff --git a/config/arch/tricore.in b/config/arch/tricore.in
new file mode 100644
index 00000000..cff8ca63
--- /dev/null
+++ b/config/arch/tricore.in
@@ -0,0 +1,10 @@
+# tricore specific configuration file
+
+## no-package
+## depends on EXPERIMENTAL
+##
+## select ARCH_SUPPORTS_32
+## select ARCH_SUPPORTS_BOTH_ENDIAN
+## select ARCH_DEFAULT_LE
+## select ARCH_SUPPORTS_FLAT_FORMAT
+
diff --git a/samples/tricore-none-eabi/crosstool.config b/samples/tricore-none-eabi/crosstool.config
new file mode 100644
index 00000000..7b9e2787
--- /dev/null
+++ b/samples/tricore-none-eabi/crosstool.config
@@ -0,0 +1,29 @@
+CT_CONFIG_VERSION="4"
+CT_EXPERIMENTAL=y
+CT_ARCH_TRICORE=y
+CT_TARGET_CFLAGS="-ftls-model=local-exec"
+CT_TARGET_VENDOR="none"
+CT_BINUTILS_SRC_DEVEL=y
+CT_BINUTILS_DEVEL_URL="https://github.com/EEESlab/tricore-binutils-gdb.git"
+CT_BINUTILS_DEVEL_REVISION="01caba3cd2fdc00c881703063beadb080f6d4801"
+CT_BINUTILS_V_2_40=y
+CT_BINUTILS_EXTRA_CONFIG_ARRAY="--disable-warn-rwx-segments"
+CT_NEWLIB_SRC_DEVEL=y
+CT_NEWLIB_DEVEL_URL="https://github.com/EEESlab/tricore-newlib-cygwin.git"
+CT_NEWLIB_DEVEL_REVISION="240a8f676ea923c703824e996fbe88ac4a302e17"
+CT_NEWLIB_V_4_3=y
+CT_LIBC_NEWLIB_IO_C99FMT=y
+CT_LIBC_NEWLIB_IO_LL=y
+CT_LIBC_NEWLIB_IO_FLOAT=y
+CT_LIBC_NEWLIB_IO_POS_ARGS=y
+CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y
+CT_LIBC_NEWLIB_REENT_SMALL=y
+CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y
+# CT_LIBC_NEWLIB_WIDE_ORIENT is not set
+CT_LIBC_NEWLIB_NANO_MALLOC=y
+CT_LIBC_NEWLIB_EXTRA_CONFIG_ARRAY="--enable-newlib-iconv --enable-newlib-reent-binary-compat"
+CT_GCC_SRC_DEVEL=y
+CT_GCC_DEVEL_URL="https://github.com/EEESlab/tricore-gcc.git"
+CT_GCC_DEVEL_REVISION="a383090685ca58596857bbe314dd4d16828e41e5"
+CT_GCC_V_13=y
+CT_CC_LANG_CXX=y
diff --git a/samples/tricore-none-eabi/reported.by b/samples/tricore-none-eabi/reported.by
new file mode 100644
index 00000000..773d44ab
--- /dev/null
+++ b/samples/tricore-none-eabi/reported.by
@@ -0,0 +1,3 @@
+reporter_name="Jesus Ferreira"
+reporter_url=""
+reporter_comment="tricore-unknown-eabi"
diff --git a/scripts/build/arch/tricore.sh b/scripts/build/arch/tricore.sh
new file mode 100644
index 00000000..1051b56f
--- /dev/null
+++ b/scripts/build/arch/tricore.sh
@@ -0,0 +1,9 @@
+# Compute tricore-specific values
+
+CT_DoArchTupleValues()
+{
+ # The architecture part of the tuple:
+ CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX}"
+ CT_ARCH_ENDIAN_CFLAG=""
+ CT_ARCH_ENDIAN_LDFLAG=""
+}
diff --git a/scripts/config.sub b/scripts/config.sub
index 2c6a07ab..3a5a6bb8 100755
--- a/scripts/config.sub
+++ b/scripts/config.sub
@@ -1250,6 +1250,7 @@ case $cpu-$vendor in
| tahoe \
| thumbv7* \
| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tricore \
| tron \
| ubicom32 \
| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \