TI Deep Learning Product User Guide
Build Instruction

Build instructions for TIDL-RT

By default, TIDL release includes all required pre-built libraries & executables. If there is no code change, you don't need to rebuild it. If you want to use a new firmware release of c7x-mma-tidl or you want to develop code, you can rebuild the firmware package by following the instructions below:

Build Dependencies

Before proceeding, please download all the dependent software components. These dependencies can also be automatically downloaded & built by the following script in your SDK:

$ ./sdk_builder/scripts/setup_psdk_rtos.sh --install_tidl_deps

Build and Run steps

Environment Setup

Export the following variables needed for build:

export SOC=< SOC > #It should be set to one of (j721e, j721s2, j784s4, j722s, am62a). Refer to the $SOC variable in ./sdk_builder/build_flags.mak

Setting up the SDK:

Follow the steps below, for a one time setup of the SDK

$ #Untar your SDK & change directory to the base folder:
$ tar -xzf ti-processor-sdk-rtos-<SOC>-evm-<version>.tar.gz #Note, in the case of firmware builder, this path will be in the form of ti-firmware-builder-<SOC>-evm-<VERSION>
$ cd ti-processor-sdk-rtos-<SOC>-evm-<version>/ #This path is referred to as <SDK_BASE>
$ ./sdk_builder/scripts/setup_psdk_rtos.sh --install_tidl_deps #Setup dependencies
$ rm -r c7x-mma-tidl && tar -xf c7x-mma-tidl.tar.gz #Note: This step is necessary only if a patch is needed to be applied
$ #If your SOC is one of (j721e, j721s2, j784s4):
$ ln -s pdk_<SOC>_<PDK_Version>/ pdk #Create a symbolic link for pdk present in your SDK
$ #Else if your SOC is one of (am62a, j722s):
$ ln -s mcu_plus_sdk_<SOC>_<MCU_Plus_SDK_Version>/ mcu_plus_sdk

### Building TIDL Firmware and Tools:

$ #The following steps will build the TIDL-RT binary at ti_dl/rt/out/<SOC>/A72/LINUX/<TARGET_BUILD>/TI_DEVICE_armv8_test_dl_algo_host_rt.out
$ cd <SDK_BASE>
$ cd sdk_builder
$ make sdk_scrub -j
$ make sdk -j #This builds the target side dependencies & C7x Firmware
$ #The following steps will build the host emulation (x86) tools at ti_dl/tidl_tools (This can be used with OSRT: https://github.com/TexasInstruments/edgeai-tidl-tools)
$ cd <SDK_BASE>
$ cd sdk_builder
$ make tidl_pc_tools -j