sudo apt install build-essential sudo apt install p7zip-full
git clone https://github.com/volumit/tricore_gcc940_linux_bins.git
cd tricore_gcc940_linux_bins
7z x tricore_940_linux.zip.001
chmod -R +x tricore_940_linux
echo "export TRICORE_GCC_PATH=$(pwd)/tricore_940_linux/bin" >> ~/.profilesudo apt install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build
git clone https://github.com/Schleifner/qemu.git
cd qemu
git submodule update --init --progress --recursive
mkdir build
cd build
CFLAGS="-Wno-error -fcommon" ../configure --target-list=tricore-softmmu --enable-capstone=internal
make -j $(nproc)
echo "export TRICORE_QEMU_PATH=$(pwd)" >> ~/.profilesudo apt install texinfo bison flex python3-dev libdebuginfod-dev python3-pip python-is-python3
python -m pip install --upgrade setuptools --break-system-packages
git clone https://github.com/volumit/gdb-tricore.git
cd gdb-tricore
CFLAGS="-Wno-error -fcommon" ./configure --with-python=/usr/bin/python --host=x86_64-linux-gnu --target=tricore-elf --program-prefix=tricore-elf- --disable-nls --disable-itcl --disable-tk --disable-tcl --disable-winsup --disable-gdbtk --disable-libgui --disable-rda --disable-sid --disable-sim --disable-newlib --disable-libgloss --disable-gas --disable-ld --disable-binutils --disable-gprof --disable-source-highlight --with-system-zlib --prefix=$INSTALL_PREFIX --disable-werror --with-python
make -j $(nproc)
echo "export TRICORE_GDB_PATH=$(pwd)/gdb" >> ~/.profileThe tricore gdb 10 needs python 3.10, but Ubuntu 24.04 installed python 3.12 by default. To solve this problem, python 3.10 need to be installed.
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.10 python3.10-dev
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 2
sudo update-alternatives --set python /usr/bin/python3.10Btw. the add-apt-repository doesn't use apt proxy config file. If the device is behind http proxy, add-apt-repository need to work like this:
export http_proxy=http://<proxy>:<port>
export https_proxy=http://<proxy>:<port>
sudo -E add-apt-repository ppa:deadsnakes/ppapacman -S mingw-w64-x86_64-zlib
export DEBUGINFOD_LIBS="-lbcrypt"
./configure --host=x86_64-w64-mingw32 --target=tricore-elf --program-prefix=tricore-elf- --disable-nls --disable-itcl --disable-tk --disable-tcl --disable-winsup --disable-gdbtk --disable-libgui --disable-rda --disable-sid --disable-sim --disable-newlib --disable-libgloss --disable-gas --disable-ld --disable-binutils --disable-gprof --disable-source-highlight --with-system-zlib --prefix=$INSTALL_PREFIX --disable-werror --with-python
make -j $(nproc)reboot or
. ~/.profilemake asm_demo.elfmake debug_asm_demo- config the launch.json according to example_launch.json
- launch and debug in vscode
make c_demo.elfmake debug_c_demomake debug_cpp_demomake run_cpp_demostrace -s 1024 -o gcc.trace -f -e trace=/exec gcccd build
cmake ..
make