Difference between revisions of "BeagleBoard/DSP Howto"
(small introduction to the bridge driver)
|Line 2:||Line 2:|
This article explains how to use the DSP in [http://focus.ti.com/general/docs/gencontent.tsp?contentId=36915&DCMP=OMAP_Feb27_2008&HQS=Other+PR+omap3503pr OMAP3] at [[BeagleBoard|BeagleBoard]] using the [[BeagleBoard/DSP_Clarification#dsp-bridge|
This article explains how to use the DSP in [http://focus.ti.com/general/docs/gencontent.tsp?contentId=36915&DCMP=OMAP_Feb27_2008&HQS=Other+PR+omap3503pr OMAP3] at [[BeagleBoard|BeagleBoard]] using the [[BeagleBoard/DSP_Clarification#dsp-bridge|]] kernel module. For DSP tool chain see [[BeagleBoard#C64x.2B_DSP|C64x+ DSP]].
= Setup =
= Setup =
Revision as of 11:24, 16 May 2010
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 .
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 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
This module currently is under heavy development. If you want be updated you should pull for changes weekly or so.
The default configuration for the beagle board doesn't enable de bridgedriver. You should build you own using
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 make uImage make INSTALL_MOD_PATH=/media/rootfs modules_install
In order to get the DSP binaries for multimedia processing you need to download TI's OpenMAX IL package. Once you have extracted the tarball you'll have to run the installer TI-OMX-Sample-Firmware-0.3-Linux-x86-Install and accept the license agreement.
You would end up with a bunch of binaries in
lib/dsp, copy them to your root filesystem at the same location (/lib/dsp).
If you want to test the DSP you can try the simple ping test provided in this package.
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
On the other hand, 'ddspbase_tiomap3430.dof64P' has the node statically included, so there's no need to do that.
On the board use this to load the module:
modprobe bridgedriver base_img=/lib/dsp/baseimage.dof
There are two ways to compile your own DSP nodes; the official one which requires XDC tools, and the simplified one (which I prefer).
Download the dsp-bridge examples from the omapzoom project. Once you extract the main tarball you'll need to extract the individual tarballs on the same directory, so you have something like:
config.bld documents dsp mpu_api mpu_driver product.mak samplemakefile samples
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
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.
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.