Difference between revisions of "BeagleBoard/DSP Howto"

From eLinux.org
Jump to: navigation, search
(fix cgt and dspbios urls)
Line 135: Line 135:
But either way, you will need the TI's DSP toolchain:
But either way, you will need the TI's DSP toolchain:
*[https://myportal.ti.com/portal/dt?provider=TIPassLoginSingleContainer&lt=myti&j5=2&j3=1&goto=https%3A%2F%2Fwww-a.ti.com%3A443%2Fdownloads%2Fsds_support%2Ftargetcontent%2FLinuxDspTools%2Fdownload.html CGT] 6.0.22 (Code Generation Tools)
* [https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm CGT] 6.0.22 (Code Generation Tools)
* [https://myportal.ti.com/portal/dt?provider=TIPassLoginSingleContainer&lt=myti&j5=2&j3=1&goto=https%3A%2F%2Fwww-a.ti.com%3A443%2Fdownloads%2Fsds_support%2Ftargetcontent%2Fbios%2Findex.html DSP/BIOS] 5.33.04
* [http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/bios/index.html DSP/BIOS] 5.33.04
Please note that you might be required to register to gain access to those files.
Please note that you might be required to register to gain access to those files.

Revision as of 13:29, 16 May 2010

This article explains how to use the DSP in OMAP3 at BeagleBoard using the bridge driver kernel module. For DSP tool chain see C64x+ DSP.

DSP Bridge driver provides features to control and communicate with DSP enabling parallel processing for multimedia acceleration. It enables the applications running on MPU to offload the processing to DSP [1].

Some of the key features of DSP Bridge are:

  • Messaging: Ability to exchange fixed size control messages with DSP
  • Dynamic memory management: Ability to dynamically map files to DSP address space
  • Dynamic loading: Ability to dynamically load new nodes on DSP at run time
  • Power Management: Static and dynamic power management for DSP


In order to enable the DSP in your OMAP3 the procedure is two-fold:

  • GPP side (ARM side): Enable the bridge driver kernel module.
  • DSP side: Set the required files in the filesystem.
    • Most of these files are, right now, TI's proprietary binaries.

Kernel driver

In order to use the DSP you would need TI's bridgedriver module on the kernel. You can use the linux-omap repository's branch at kernel.org:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
cd linux-omap-2.6
git checkout -b dspbridge orgin/dspbridge

Warning: This module currently is under heavy development. If you want be updated you should pull for changes weekly or so. Besides, this how-to could be already deprecated.

The default configuration for the beagle board doesn't enable de bridgedriver. You should build you own using

 make menuconfig

or fetching the one used in marmita:

wget http://gitorious.org/vjaquez-beagleboard/marmita/blobs/raw/master/meta-marmita/linux/linux-omap-bridgedriver/defconfig -O .config

If you want DSS2 support for the Beagleboard, you should apply this patch in your kernel code: https://patchwork.kernel.org/patch/94049/

wget -q https://patchwork.kernel.org/patch/94049/mbox/ -O - | git am --3way

Then build the uImage as usual and install the modules on your rootfs:

make oldconfig
make uImage
make INSTALL_MOD_PATH=/media/rootfs modules_install

TI's DSP binaries

In order to get the DSP binaries for multimedia processing you need to download them from TI's OpenMAX IL project. The most important binary is baseimage.dof, which is the BIOS image to be loaded into the DSP.

The latests release of these binaries for mainstream Linux is v3.09 for L23i3.3.

Most of the public releases are published in TI's gforge.


Download the binary package and extract its content:

wget --no-check-certificate https://gforge.ti.com/gf/download/frsrelease/285/3260/DSPbinaries-3.09-Linux-x86-Install
chmod +x ./DSPbinaries-3.09-Linux-x86-Install
./DSPbinaries-3.09-Linux-x86-Install  --mode console --prefix /tmp

Then copy those binaries into the directory lib/dsp in your root filesystem (/media/rootfs is assumed here):

mkdir /media/rootfs/lib/dsp
cp /tmp/Binaries/* /media/rootfs/lib/dsp


wget --no-check-certificate https://gforge.ti.com/gf/download/frsrelease/170/1399/tiopenmax-0.3.5.tar.gz
tar xvf ./tiopenmax-0.3.5.tar.gz
cd tiopenmax-0.3.5

Accept the license agreement and copy the binaries into the directory lib/dsp in your root filesystem:

mkdir /media/rootfs/lib/dsp
cp ./lib/dsp/* /media/rootfs/lib/dsp


wget --no-check-certificate https://gforge.ti.com/gf/download/frsrelease/111/396/tiopenmax-0.3.tar.gz
tar xvf ./tiopenmax-0.3.tar.gz
cd tiopenmax-0.3

Accept the license agreement and copy the binaries into the directory lib/dsp in your root filesystem:

mkdir /media/rootfs/lib/dsp
cp ./lib/dsp/* /media/rootfs/lib/dsp


On the board use these commands to load the module:

modprobe mailbox
modprobe bridgedriver base_img=/lib/dsp/baseimage.dof

ping test

If you want to test the DSP you can try the simple ping test provided in this package. The package provide a set of already compiled tests, either for ARM-side and DSP-side.

Installing shortcut:

wget -q --no-check-certificate https://omapzoom.org/gf/download/frsrelease/132/632/dspbridge_binaries.tar.bz2 -O - \
     | tar xjvf - --strip-components 1 --wildcards dspbridge_binaries/ping*
cp ping.out /media/rootfs                    # ARM-side app
cp pingdyn_3430.dll64P /media/rootfs/lib/dsp # DSP-side socket node

In the board just:


If you get an error like:

DSPNode_Allocate failed: 0x80008008

Then it's possible that the ping DSP socket node is not loaded. If you use 'baseimage.dof' you need to load it dynamically:

./dynreg.out -r pingdyn_3430.dll64P


There are two ways to compile your own DSP nodes:

  • The official one which requires XDC tools
  • The simplified one (used by Felipe Contreras)

But either way, you will need the TI's DSP toolchain:

Please note that you might be required to register to gain access to those files.

This HOWTO assumes that all those DSP toolchain related packages are installed under /opt/dsp.


These instructions are documented in the DSPBrdige project wiki page at omapedia.

git clone git://dev.omapzoom.org/pub/scm/tidspbridge/userspace-dspbridge.git
cd userpace-dspbridge

DSP side

You'll need the C6x compiler, extract it in "/opt/dsp/cgt6x-6.0.22". The recommended version is v6.0.22.

You'll need the "DSP/BIOS" package and "RTSC/XDCtools" in order to compile the dsp-brige examples, you can download them from here. Here we will assume they are installed in "/opt/dsp".

Edit "product.mak" to match the version of your tools. Then run:

make -f samplemakefile .bridge_samples DD_XDCDIR=/opt/dsp/xdctools_3_10_02 SABIOS_DIR=/opt/dsp/bios_5_33_04/packages DEPOT=/opt/dsp

ARM side

You'll need to prepare a target directory:

export target=/tmp/dsp-target
mkdir -p $target/lib

Also, build libbridge and libqos:

cd mpu_api/src
make PREFIX=$target/.. CROSS=arm-linux- install

To build the examples:

cd samples/mpu/src
make PREFIX=$target/.. CROSS=arm-linux- LIBINCLUDES=$target/lib LDPATH=$target/lib install

All you need will be on '/tmp/dsp-target'.


In order to develop dynamic dsp nodes you'll need a C6x compiler (the recommended version is v6.1.7) and doffbuild tools.

doffbuild tools

The only relevant tool is DLLcreate, which can be found in TI's omapzoom site, on the dspbridge_dsp package.

mkdir -p tmp
tar -xf dspbridge_dsp.tar.gz -C tmp
mv tmp/dsp/bdsptools/packages/ti/dspbridge/dsp/doffbuild /opt/doffbuild
rm -rf tmp

Example dsp node

Here is an example dsp node that is simply passing buffers back and forth.

git clone git://github.com/felipec/dsp-dummy.git
make DSP_TOOLS=/opt/dsptools DSP_DOFFBUILD=/opt/doffbuild

As a result you'll have two binaries; dummy.dll64P for dsp-side, and dummy for arm-side.

To load the dynamic node:

/dspbridge/dynreg.out -r /lib/dsp/dummy.dll64P

Now you can run the dummy test application.

Further information

  1. Official OMAP DSP Bridge documentation

See also