Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Compiling TI OpenCL and dependencies from source

Compiling TI OpenCL and dependencies from source

In the following instructions, keep in mind that I'm using an install prefix of ~/ti as a placeholder while I attempt to bring on OpenCL by hand. That, and some other paths will be replaced with Buildroot-specific install directories later on.

Install host binaries

C66x DSP compiler

chmod +x ti_cgt_c6000_8.2.2_linux_installer_x86.bin
# NOTE: this will not terminate due to some bug in TI's installer.
# Run without --mode unattended' so you can see when it's safe to kill the process.
./ti_cgt_c6000_8.2.2_linux_installer_x86.bin --prefix ~/ti --mode unattended


unzip -d ~/ti

TI ARM-cortex compiler

chmod +x ti_cgt_tms470_16.9.2.LTS_linux_installer_x86.bin
./ti_cgt_tms470_16.9.2.LTS_linux_installer_x86.bin --prefix ~/ti --mode unattended

Build TI's LLVM fork (don't worry, it's old and builds pretty fast)

mkdir ti-llvm
cd ti-llvm
git clone --single-branch --branch release_36_ti --depth 1 git://
git clone --single-branch --branch release_36_ti --depth 1 git:// llvm/tools/clang
# Keep the j[obs] number low here or you'll incure the wrath of Linux's OOM killer
make -j4 -f llvm/Makefile.ti all.x86
make -j4 -f llvm/Makefile.ti all.arm

Build OpenCL

git clone git://
cd ti-opencl
git checkout v01.01.17.01

PATH=$PATH:~/nextgate/rootfs/output/host/bin     \
USE_EXTERNAL_FW_REPO=1                           \
BUILD_EVE_FIRMWARE=0                             \
XDC_DIR=~/ti/xdctools_3_50_07_20_core            \
TI_OCL_CGT_INSTALL=~/ti/ti-cgt-c6000_8.2.3       \
TI_OCL_M4_CGT_INSTALL=~/ti/ti-cgt-arm_16.9.2.LTS \
LINUX_DEVKIT_ROOT=~/nextgate/rootfs/output/host  \
X86_LLVM_DIR=~/repos/ti-llvm/install.x86         \
ARM_LLVM_DIR=~/repos/ti-llvm/install.arm         \
DESTDIR=~/ti/ocl-build                           \
make BUILD_AM57=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.