Building The OMAP-L1 SDK

From Texas Instruments Wiki
Jump to: navigation, search

Important Note:

The software discussed on this site is available for download, but is no longer being actively developed. This wiki is in maintenance mode and the software is supported on OMAPL1x Processor E2E forum


ATTENTION OMAP-L138 DEVELOPERS: The Generally Available (GA) Linux DVSDK 4.x for the OMAP-L138 device is now available here. There are various capabilities and improvements that have been added to this version. This is the recommended release kit for development which supersedes the SDK 1.00.xx Beta. The majority of the information below is only applicable to the SDK 1.00.xx Beta.


  • SDK Software installed
  • Linux kernel configured and built

For OMAP-L137

  • MV Tools installed

For OMAP-L138

  • Code Sourcery tools installed

We strongly recommend you make backups of the software you are planning on rebuilding.

Quick build instructions for OMAPL-138

These instructions are only valid for OMAPL-138. On OMAPL-138 you have the choice of either manually building the SDK components (see Manually building the SDK below) or using these quick instructions. For OMAPL-137 you will have to use the manual instructions.

Setting up the Rules.make

In the OMAPL-138 SDK (not the OMAPL-137 SDK) there is a top level Rules.make file which contains the installation directories of the SDK components. This file lets you upgrade individual components at a later stage and redirecting the SDK build to take advantage of a new components version.

After you have installed the OMAPL-138 SDK, edit the Rules.make file:

host $ cd OMAP_L138_arm_1_00_00_xx
host $ gedit Rules.make

Here you will have to change the following variables before building the SDK:

EXEC_DIR                = <SDK_INSTALL_DIR>/install

SDK_INSTALL_DIR is the root location of the installed OMAPL-138 SDK. This directory contains the 'Rules.make' file(/home/user/OMAP_L138_arm_1_00_00_08 for example).

CSTOOL_DIR is where the Code Sourcery tool chain resides (the directory above 'bin', /home/user/CodeSourcery/Sourcery_G++_Lite for example).

BIOS_INSTALL_DIR is where DSP/BIOS has been installed (the directory containing the 'eclipse' directory, /home/user/OMAP_L138_arm_1_00_00_08/bios_5_41_02_14 for example).

XDC_INSTALL_DIR is where the XDC tools has been installed (the directory containing 'gmake' and 'xs', /home/user/OMAP_L138_arm_1_00_00_08/xdctools_3_16_01_27 for example).

CODEGEN_INSTALL_DIR is where the TI C6x compiler tool chain is installed (the directory above 'bin', /home/user/OMAP_L138_arm_1_00_00_08/cg6x_6_1_9 for example).

LINUXKERNEL_INSTALL_DIR is where the OMAPL-138 PSP Linux kernel is installed (the directory containing the 'Documentation' directory, /home/user/OMAP_L138_arm_1_00_00_08/DaVinci-PSP-SDK- for example for complete path for LINUXKERNEL_INSTALL_DIR).

EXEC_DIR is the directory where after building the components the binaries will be installed (/home/user/workdir/filesys for example).

When you have edited these paths correctly, execute the following command and inspect the output to make sure your Rules.make was successfully edited (you will see the specific warning below even if you have set up your Rules.make correctly, but you shouldn't see any more warnings):

host $ make check
Checking that components in Rules.make are found:
WARNING: /docs doesn't exist, check your Rules.make..
Done checking! If no warning messages above, all components are found..

You can also execute this command to list the versions of all components in your system (useful for communicating with TI support):

host $ make info

Building the components

The SDK top level Makefile has targets for building the components quickly. Assuming you are still in the SDK directory after having edited the Rules.make, this is how you build dsplink:

host $ make dsplink_clean
host $ make dsplink

This will build the dsplink ARM and DSP side as well as the dsplink examples. The DSPLink Linux kernel module will be put in the kernel_binaries/omapl138 directory in the top level SDK directory.

To build the codec server execute:

host $ make codecs_clean
host $ make codecs

This will build the codec server and the resulting DSP image is available from cs1omapl138_1_00_00/packages/ti/sdo/server/cs/bin/cs.x64P.

To build CMEM (the contiguous memory allocator) execute:

host $ make cmem_clean
host $ make cmem

The CMEM Linux kernel module will be put in the kernel_binaries/omapl138 directory in the top level SDK directory.

The top level Makefile does not include support for building the 'Codec Engine examples', to build these you will have you use the manual instructions below. For a complete list of top level build targets execute the following:

host $ make help

Manually building the SDK

Note: In general, the instructions for building the SDK for both OMAP-L137 and OMAP-L138 are the same. Follow the steps on this page that are specific to your device.

Note: Up to today, the latest version of OMAPL137 SDK is (GA). The latest version of OMAPL138 SDK is (BETA2). In the following text, OMAPL137 software means the GA version of the OMAPL137 SDK and OMAPL138 software means the BETA2 version of the OMAPL138 SDK, unless specified otherwise.


CMEM is an API and library for allocating physically contiguous memory. It's currently distributed with all Linux-based DVSDK releases. See CMEM Overview for more details.

Please note that once the CMEM driver is built, the size and configuration of memory it should manage can be configured via command line (during the 'insmod' of the CMEM driver).


Steps to be performed in Linux Host assuming the software listed in prerequisites section above is installed.

Step 1: Go to the cmem root directory
   host $ cd OMAPL13#_arm_1_##_##_##/linuxutils_2_##_##/packages/ti/sdo/linuxutils/cmem

Step 2: Edit Rules.make using your preferred text editor (e.g. vi, gedit, emacs...).

  • Make sure all the path variables are correct, especially EXEC_DIR, MVTOOL_PREFIX, LINUXKERNEL_INSTALL_DIR and CODEC_INSTALL_DIR (for OMAPL138 users).
  • For OMAPL137 software, comment out the UCTOOL_PREFIX since uclibc tools are not available by default in this DVSDK.

For OMAPL137 Software


For OMAPL138 Software


Step 3: build the binary

host $ make clean
host $ make
host $ make install


DSPLink is foundation software for the inter-processor communication across the GPP-DSP boundary. It provides a generic API that abstracts the characteristics of the physical link connecting GPP and DSP from the applications. It eliminates the need for customers to develop such link from scratch and allows them to focus more on application development. For more details see DSPLink Overview.

Below are steps for rebuilding DSPLink. Please note that these steps are detailed in the documentation accompanying DSPLink (look under dsplink root directory for a folder called 'doc'), but the steps below are a simplified version specific to OMAP-L137.

Note: Up to today, the DSPLINK version in OMAPL137 software is dsplink-1_61_03-prebuilt and the version in OMAPL138 software is, although DSPLINK supports OMAPL137 as well. In the following of the section, the "DSPLINK_DIR" is used to refer to the DSPLINK root directory. For OMAPL137 software, DSPLINK_DIR = dsplink-1_61_03-prebuilt; while for OMAPL138 user, DSPLINK_DIR = dsplink_linux_1_65_00_01.

Building steps

In addition to the above pre-requisites, DSPLink 1.6x included in this release requires GNU make 3.81. For your convenience there is a pre-built version of GNU make 3.81 located in the /home/<useracct>/OMAPL13x_arm_1_##_##_##/xdctools_3_1#_##_## directory. The instructions below use this version. If preferred, the updated gmake release is also available for download at

NOTE: If you use and older release of GNU make, you will get a similar error as following:

*** This makefile requires one of GNU make version 3.81 3.81beta1 3.90 3.92.  Stop.
Step 1: Set necessary environment variables

This can be done several ways; we present one method below:

First go to the directory below:

host $ cd /home/<useracct>/OMAPL13#_arm_1_##_##_##/DSPLINK_DIR/packages/dsplink/etc/host/scripts/Linux/

Then edit the file <dsplinkenv.bash> and set DSPLINK variable to the path below:

NOTE: For those not running the BASH shell, substitute <dsplinkenv> for <dsplinkenv.bash> in this step.

For OMAPL137 Software
For OMAPL138 Software
After editing and saving, source the file to actually set the environment variables:
host $ source dsplinkenv.bash
Step 2: Configure what platform you are building DSPLink for

This is done by invoking a perl script included with DSPLink. To build DSPLink using a specific ARM tool chain and platform, go to DSPLink root directory invoke the following command:

For OMAPL137 Software
host $ cd /home/<useracct>/OMAPL137_arm_1_00_00_xx/DSPLINK_DIR/packages/dsplink
host $ perl config/bin/ --platform=OMAPL1XX --nodsp=1 --dspcfg_0=OMAPL1XXGEMSHMEM --dspos_0=DSPBIOS5XX --gppos=MVL5G --comps=ponslrmc --DspTskMode=1
For OMAPL138 Software
host $ cd /home/<useracct>/OMAP_L138_arm_1_00_00_xx/DSPLINK_DIR/packages/dsplink
host $ perl config/bin/ --platform=OMAPL138 --nodsp=1 --dspcfg_0=OMAPL138GEMSHMEM --dspos_0=DSPBIOS5XX --gppos=ARM --comps=ponslrmc --DspTskMode=1

Note1: Additional details about the options above can be found at section 9.3 (DSPLink build configuration) of the DSP/Link User's Guide located at /home/<useracct>/OMAPL13x_arm_1_##_##_##/DSPLINK_DIR/packages/dsplink/doc/UserGuide.pdf

Note2: exclusively for OMAPL1, DSP/Link libraries must be built in DSP task mode (the last parameter DspTskMode).

After running this perl script, user will get a message at the bottom specifying which additional makefiles the user will need to update similar to the message below:

For OMAPL137 Software
  Please edit the following files for toolchains, kernel sources, etc changes.
  GPP side distribution file: $DSPLINK/make/Linux/
  DSP side distribution file: $DSPLINK/make/DspBios/
For OMAPL138 Software
  Please edit the following files for toolchains, kernel sources, etc changes.
  GPP side distribution file: $DSPLINK/make/Linux/
  GPP side distribution file: $DSPLINK/gpp/src/
  DSP side distribution file: $DSPLINK/make/DspBios/

Step 3: Set the correct paths for tools needed for the build

Edit GPP side Linux makefile (default path below) and correct paths to BASE_BUILDOS and BASE_TOOLCHAIN variables.

For OMAPL137 Software
BASE_BUILDOS    := /home/<useracct>/workdir/lsp/ti-davinci/linux-2.6.18_pro500
BASE_TOOLCHAIN    := /opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le
For OMAPL138 Software
BASE_BUILDOS    := /home/<useracct>/OMAP_L138_arm_1_00_00_xx/DaVinci-PSP-SDK-03.20.00.xx/src/kernel/linux-03.20.00.xx
BASE_TOOLCHAIN    := /home/user/CodeSourcery/Sourcery_G++_Lite

Edit <> (default path below) and correct paths to BASE_INSTALL, BASE_SABIOS, XDCTOOLS_DIR and BASE_CGTOOLS variables.


For OMAPL137 Software
BASE_INSTALL    := /home/<useracct>/OMAPL137_arm_1_00_00_10
BASE_SABIOS     := $(BASE_INSTALL)/bios_5_33_05
XDCTOOLS_DIR    := $(BASE_INSTALL)/xdctools_3_10_05_61
BASE_CGTOOLS    := $(BASE_INSTALL)/cg6x_6_1_9

For OMAPL138 Software

BASE_INSTALL    := /home/<useracct>/OMAPL138_arm_1_00_00_08
BASE_SABIOS     := $(BASE_INSTALL)/bios_5_41_02_14
XDCTOOLS_DIR    := $(BASE_INSTALL)/xdctools_3_16_01_27/
BASE_CGTOOLS    := $(BASE_INSTALL)/cg6x_6_1_9
For the OMAP-L138 only, you'll also need to edit the Linux (default path below) and correct paths to KERNEL_DIR and TOOL_PATH
KERNEL_DIR    := /home/<useracct>/OMAP_L138_arm_1_00_00_xx/DaVinci-PSP-SDK-03.20.00.xx/src/kernel/linux-03.20.00.xx
TOOL_PATH     := /home/<useracct>/CodeSourcery/Sourcery_G++_Lite/bin

Note: If you intend to use Codec Engine (which you will probably do), before moving to the next step make sure you enable the XDC-based integration according to this link. If this step is not followed, you might end up getting this error.

Step 4: Building the GPP-side DSPLink modules and example applications

Go to the source directories for the gpp and build the DSPLink modules

host $ cd /home/<useracct>/OMAPL13#_arm_1_##_##_##/DSPLINK_DIR/packages/dsplink/gpp/src
host $ /home/<useracct>/OMAPL13#_arm_1_##_##_##/xdctools_3_1#_##_##/gmake

Note: You may need to run this command if you get an error

host $export DSPLINK = /home/user/OMAPL13#_arm_1_##_##_##/DSPLINK_DIR/packages/dsplink

Go to the subdirectory samples to build the example applications:

host $ cd samples
host $ /home/<useracct>/OMAPL13#_arm_1_##_##_##/xdctools_3_1#_##_##/gmake -s

Step 5: Building the DSP-side DSPLink modules and example applications

Go to the source directories for the dsp and build the DSPLink modules

host $ cd /home/<useracct>/OMAPL13#_arm_1_##_##_##/DSPLINK_DIR/packages/dsplink/dsp/src
host $ /home/<useracct>/OMAPL13#_arm_1_##_##_##/xdctools_3_1#_##_##/gmake

Go to the subdirectory samples to build the example applications:

host $ cd samples
host $ /home/<useracct>/OMAPL13#_arm_1_##_##_##/xdctools_3_1#_##_##/gmake -s

The executables for the GPP- and DSP-side are located in the following directories:

For OMAPL137 Software:



For OMAPL138 Software:



For details on how to install and run the examples, please refer to section 1.5.4 of the <InstallGuide_Linux_OMAPL1xx.pdf for OMAPL137> and <InstallGuide_Linux_OMAPL138.pdf for OMAPL138>located at /home/<useracct>/OMAPL13#_arm_1_##_##_##/DSPLINK_DIR/packages/dsplink/doc

Codec Engine Examples

Note: Up to today, the codec engine version in OMAPL137 software is codec_engine_2_23_01 and the version in OMAPL138 software is, although codec engine supports OMAPL137 as well. In the following of the section, the "codec_engine_2_XX*" is used to refer to the codec engine root directory. For OMAPL137 software, codec_engine_2_XX* = codec_engine_2_23_01; while for OMAPL138 user, codec_engine_2_XX* = codec_engine_2_25_00_05.

From the application developer's perspective, the Codec Engine is a set of APIs that you use to instantiate and run xDAIS algorithms. See Codec Engine overview for more details.

The Codec Engine examples include examples for

  codecs    (algorithms codec engine framework can instantiate and run)
  servers   (server containing one or more codec engine algorithms)
  apps      (arm application which load servers and use codec engine APIs to access algorithms)

This is a very good starting point for customers looking to write/integrate algorithms; this examples includes source code that can be used for reference.

To rebuild Codec Engine examples, simply follow the Building the examples: step-by-step instructions section in the following file


Below are some useful hints as you go through the installations instructions above

Hint 1. If using CE 2.23 or earlier (i.e. OMAPL137 software), in user.bld set doBuild to false for uClibc, C64P, and PC

      { doBuild: false, // build for uC Linux
          target:  "gnu.targets.UCArm9",
      /* ... */
      "DSP":    [{doBuild: false, // DSP builds (DSP servers for dual-CPU platforms or full apps for DSP-only platforms)
                target:  "ti.targets.C64P",
      /* ... */
      "PC":     [{doBuild: false,  // build for PC Linux
                target:  "gnu.targets.Linux86",

Hint 2. If using CE 2.23 or earlier (i.e. OMAPL137 software), in user.bld change the t.LONGNAME toward the end of the file to point to right tool-chain binary

/* ... in user.bld ... */
if ( == "GCArmv5T") {
    t.LONGNAME = "bin/arm_v5t_le-gcc";

Hint 3. in examples/xdcpaths.mak define the devices for only the devices you wish to build

If OMAP-L137, set:

# ... in examples/xdcpaths.mak ...

If OMAP-L138, set:

# ... in examples/xdcpaths.mak ...

Hint 4. For OMAPL137 users using CE 2.23, the following paths should be set in your xdcpaths.mak if using default installation directories

# ... in examples/xdcpaths.mak ...
CE_INSTALL_DIR 	 := /home/user/omapl1/OMAPL137_arm_1_00_00_10/codec_engine_2_23_01
XDC_INSTALL_DIR  := /home/user/omapl1/OMAPL137_arm_1_00_00_10/xdctools_3_10_05_61
BIOS_INSTALL_DIR := /home/user/omapl1/OMAPL137_arm_1_00_00_10/bios_5_33_05

# no need to specify the installation directories below if your CE installation
# has cetools/ directory on top
XDAIS_INSTALL_DIR     := /home/user/omapl1/OMAPL137_arm_1_00_00_10/xdais_6_23
DSPLINK_INSTALL_DIR   := /home/user/omapl1/OMAPL137_arm_1_00_00_10/dsplink-1_61_03-prebuilt
CMEM_INSTALL_DIR      := /home/user/omapl1/OMAPL137_arm_1_00_00_10/linuxutils_2_23_01
FC_INSTALL_DIR        := /home/user/omapl1/OMAPL137_arm_1_00_00_10/framework_components_2_23_01
BIOSUTILS_INSTALL_DIR := /home/user/omapl1/OMAPL137_arm_1_00_00_10/biosutils_1_02_01

For OMAPL138 users, the path variables should be updated correctly in the similar way, depending on the actual software installation directory.

Hint 5. For OMAPL137 users using CE 2.23, fix the name of the tool-chain binary in xdcpaths.mak

# ... in examples/xdcpaths.mak ...
CC_V5T = bin/arm_v5t_le-gcc
CGTARGET = gnu.targets.arm.GCArmv5T

Hint 6. For OMAPL138 users using CE 2.25 or later, the following are correct values of some of important variables in xdcpaths.mak

# ... in examples/xdcpaths.mak ...
CC_V5T := bin/arm-none-linux-guneabi-gcc
CGTARGET := gnu.targets.arm.GCArmv5T

Build Codec Server

The OMAPL138 BETA2 SDK (version starts support codec server which is a DSP executable image consists of multiple VISA (video, image, speech and audio) codecs. The codec server resides on DSP and follows the XDM standard so that it can be invoked from Linux application using Codec Engine.

The codec server package can be downloaded from SDK page. The package is in the name of cs1omapl138_1_xx_xx.

The detailed instructions to build the codec server for OMAPL138 can be found in the release notes of the codec server package. After the installation process is done, a folder "cs1omapl138_1_00_xx" will be created in the installation folder. The release notes will be $(CS_INSTALL_DIR)\cs1omapl138_1_00_xx\cs1omapl138_release_notes.htm.

Codecs being included

The following codecs (in object format) are being included in the codec server package. You can find them in folder $(CS_INSTALL_DIR)\cs1omapl138_1_00_xx\packages\ti\sdo\codecs

  • AAC decoder (aachedec)
  • G711 encoder (g711enc) and decoder (g711dec)
  • H.264 encoder (h264enc) and decoder (h264dec)
  • JPEG encoder (jpegenc) and decoder (jpegdec)
  • MPEG4 encoder (mpeg4enc) and decoder (mpeg4dec)
  • MPEG3 decoder (mpeg2dec)

Dependent packages to build codec server

The following software packages are needed to build codec server. The version being listed for the dependent packages match with the codec server package 1.00.00.

  • codec engine (version
  • framework components (version
  • dsplink (version
  • bios (version
  • xdc tool (version
  • code generation tool (version 6.1.9)
  • bios utilities (version 1.02.02)
  • xdais (version
  • cmem which is also referred as linux utilities (version

All these components can be downloaded from the SDK download page. Note that bios utilities, codec engine, dsplink, frameowrk components, cmem and xdais are contained in package OMAP_L138_1_00_00_xx.tar.gz.

Steps to build the codec server

  • Install the codec server package.
  • Install all the other dependent packages listed above.
    • To install OMAP_L138_1_00_00_xx.tar.gz on the Linux host, a simple command "tar -xzf OMAP_L138_1_00_00_xx.tar.gz" should be enough.
    • To install other component after downloading them to the Linux host, you will need to execute the binary exeutable. For example, the following commands install the bios.
> chmod 555 bios_setuplinux_5_41_02_14.bin
> ./bios_setuplinux_5_41_02_14.bin
  • Generate file Rules.make in the codec server installation directory (one level above $(CS_INSTALL_DIR)\cs1omapl138_1_00_xx\). Define the following path variables in Rules.make, depending on where you install them.
    • CE_INSTALL_DIR, which is the path of the codec engine installtion directory. For example, CE_INSTALL_DIR = /home/user/OMAP_L138_arm_1_00_00_08/codec_engine_2_25_00_05
    • CODEC_INSTALL_DIR, which is the path of the codec server installtion directory. For example, CODEC_INSTALL_DIR = /home/user/cs1omapl138_1_00_00
    • FC_INSTALL_DIR, which is the path of framework components installation directory. For example, FC_INSTALL_DIR = /home/user/OMAP_L138_arm_1_00_00_08/framework_components_2_25_00_04.
    • LINK_INSTALL_DIR, which is the path of dsplink installation directory. For example, LINK_INSTALL_DIR = /home/user/OMAP_L138_arm_1_00_00_08/dsplink_linux_1_65_00_01
    • BIOS_INSTALL_DIR, which is the path of bios installation directory. For example, BIOS_INSTALL_DIR = /opt/ti-tools/bios_5_41_02_14
    • XDC_INSTALL_DIR, which is the path of xdc tools installation directory. For example, XDC_INSTALL_DIR = /opt/ti-tools/xdctools_3_16_01_27
    • CODEGEN_INSTALL_DIR, which is the path of code generation tool installation directory. For example, CODEGEN_INSTALL_DIR = /opt/ti-tools/cg6x_6_1_9
    • BIOSUTILS_INSTALL_DIR, which is the path of bios utilities installation directory. For example, BIOSUTILS_INSTALL_DIR = /home/user/OMAP_L138_arm_1_00_00_08/biosutils_1_02_02
    • XDAIS_INSTALL_DIR, which is the path of xdais tool installation directory. For example, XDAIS_INSTALL_DIR = /home/user/OMAP_L138_arm_1_00_00_08/xdais_6_25_01_08
    • CMEM_INSTALL_DIR, which is the path of linux utilities installation directory. For example, CMEM_INSTALL_DIR = /home/user/OMAP_L138_arm_1_00_00_xx/linuxutils_2_25_01_06
  • Switch to the codes server installtion directory on the linux host, i.e. "cd (CS_INSTALL_DIR)\cs1omapl138_1_00_xx\".
  • Type "make clean" to clean up.
  • Type "make" to build the codec server. The binary will be generated as (CS_INSTALL_DIR)\cs1omapl138_1_00_xx\packages\ti\sdo\server\cs\bin\cs.x64P.

What's Next?

If you are using the OMAP-L137, please continue on to the Additional Procedures section of the OMAP-L137 Getting Started Guide.

If you are using the OMAP-L138, please continue on to the Additional Procedures section of the OMAP-L138 Getting Started Guide.