There are multiple options of how to make use of the onboard TI TMS320C64x+ DSP. The first step is to install the GPP/DSP interface. Two of the more popular interface options are DSPBridge and DSPLink. Both were developed by TI but DSPLink is still supported, which makes DSPLink a more preferable option. After selecting DSPLink as the GPP/DSP interface, you need to build DSPLink for your specific platform. There are two options of doing this as well. Both of these options will install DSPLink and also configure your host system so you can compile your own GPP and DSP applications.
Although the instructions written at this website were designed around a BeagleBoard which has an OMAP3530 + TMS320C64x+ DSP, the instructions should be compatible across a variety of platforms with only a minimal number of changes.
OpenEmbedded includes a bitbake recipe to install ti-codec-engine. However, multiple files are needed for this bitbake recipe to complete. This guide will instruct how to get the ti-codec-engine to build successfully for use on the BeagleBoard. The guide expects you to have already built an OpenEmbedded image according to elinux and installed the root file system and uImage onto a formatted SD card.
Once DSPLink has been installed on both your BeagleBoard and your Linux Host System, further configuration is necessary to compile GPP and DSP code. The second half of this guide will show you how to do this.
To start, make sure that you have set the directory environment variable for OpenEmbedded. Replace "oe" to whatever your OpenEmbedded root directory is called.
$ export OE_HOME=$HOME/oe
You will need to download and install three binary files: C6x Compiler, DSP/BIOS Link, and XDCtools. Registration at the TI website is needed for all three files and the user license must be accepted.
The latest versions of the three files might work just fine but I have not
tested them. The versions I used to get it working, as suggested by various
TI frequently updates their site so searching for these files may be required. A newer version of BIOS 5.33.02 should be tested since this version has a Critical 283xx (28x floating point) bug.
Once all three are downloaded, change permissions of each .bin file to make it an executable like such:
$ cd ~/Desktop
Run the binary file to open a graphical installer
Do this for all three binaries.
Install the files to a folder TI under your root directory. The installation of each binary file should be located as such:
Download the codec engine tarball, codec_engine_2_21.tar.gz at https://www-a.ti.com/downloads/sds_support/targetcontent/CE/index.html. Version 2.21 is required by the bitbake recipe. There is no need to untar this file. Copy the file to your tmp/downloads folder and create a md5 checksum.
$ cd ~/Desktop
Open ti-paths.inc which is also located under the dsplink recipe directory.
$ gedit $OE_HOME/beagleboard/beagleboard/conf/local.conf
Add the following lines of code to the bottom of the file. Version numbers and directory locations should be adjusted accordingly if using. In the line TITOOLSDIR = "/home/user/TI", change "user" to whatever your username is.
# Path to the dir where the TI tools are unpacked
Now enter openembedded shell, update, and bitbake ti-codec-engine
$ source $OE_HOME/beagleboard/beagleboard/profile.sh
Bitbake should complete successfully. Once completed, the following packages are added to $OE_HOME/tmp/deploy/glibc/ipk/beagleboard directory:
Copy these files to the the rfs of the BeagleBoard and use opkg to install them. There may be a correct order of installing the files to avoid the warnings of "ti-codec-engine-xxx: unsatisfied recommendation for xxx". Install all 8 packages.
# opkg install ti-cmem-module_221-r19.1_beagleboard.ipk
Memory settings need to be adjusted on the BeagleBoard. Reset the board and stop the board from autobooting by pressing any key. Insert the following commands and save the environment. This will set the kernel memory to 80MB which leaves 48MB for DSPLink, CMEM, and DDRALGHEAP. Reset the board once finished.
OMAP3 beagleboard.org # setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/mmcblk0p2 rw rootwait rootdelay=2 mem=80M video=omapfb:vram:2M,vram:4M'
OMAP3 beagleboard.org # saveenv
OMAP3 beagleboard.org # reset
Additionally, you will need to install the DSPLink kernel module every time you reboot the BeagleBoard. There are two scripts at /usr/share/ti-dsplink with the option of either loading or unloading the modules.
root@beagleboard:~# cd /usr/share/ti-dsplink
Instead of loading the modules manually every time on reboot, you can instruct the BeagleBoard to load the modules on startup.
root@beagleboard:~# cp /usr/share/ti-dsplink/loadmodules-ti-dsplink-apps.sh /etc/init.d/
Using "defaults" start the service in runlevels 2345 and to stop the service in runlevels 016. Please see the update-rc.d man page for more information on this command.
Once installed, there are some sample applications provided that can be used to test the installation. They are also located in /usr/share/ti-dsplink. Please see the DSPLink programmers guide for more information on each application.
Messagegpp is a simple application that transfers a user defined amount of
messages. It expects the user to start the application in the following format:
Ringiogpp provides Ring Buffer based data streaming between the GPP and DSP.
It expects the user to start the application in the following format:
Mpcsxfergpp provides data transfer between the GPP and DSP through shared
buffers with mutually exclusive access protection. It expects the user to start
the application in the following format:
After following the first half of this guide, you will have installed a full
version of DSPLink 1.60.0 on your host machine. It is located inside your oe
To command line compile the sample applications located in this directory, you will need edit two makefiles. In the makefiles, you will link to the tools you have already installed including the C64+ Compiler, the XDCTools, and DSP/BIOS. Additionally, you will link to files within the OpenEmbedded directory such as the omap3530 cross compilers and the OE kernel.
If you are looking to develop your own DSP applications, it is highly suggested to start off with one of the sample applications provided by TI. It has much of the low level framework already in place including initializing the DSP, allocating buffers, transferring messages, etc. Therefore, research which sample application would most fit the needs of your project and begin with that. You can read about each sample application in the Sample Applications section of the TI User Guide located in the docs folder.
When working with DSPLink, it is necessary to set an environment variable for the DSPLink directory. You can use the second optional command to add it to your default terminal shell.
$ export DSPLINK=$HOME/oe/tmp/staging/beagleboard-angstrom-linux-gnueabi/ti-codec-engine/cetools/packages/dsplink
There are a number of directories DSPLink looks for when compiling. To tell DSPLink where to find these, there are two make files that need to be tailored to your environment. The two files that need to be changed are:
If you have followed the previous steps of installing all other files without changing the directory locations, you can use the custom versions of these files I created. They are attached to the bottom of this wiki. They can be found at the bottom of the wiki. It would be best to not replace your existing files with the wiki's files but instead, compare the two files and note the differences. If any folder locations do not match up with the setup of your files, fix the links.
There is one change needed in the omap3530_2.6.mk makefile that is not as straightforward as the others. You need to add additional options to STD_KRNL_FLAGS which will make it properly link to ARM kernel header files such as memory.h and IO.h. Edit STD_KRNL_FLAGS to the following: STD_KRNL_FLAGS := -c -nostdinc -include $(BASE_OSINC)/linux/autoconf.h -isystem $(OSINC_PLATFORM) -D__KERNEL__ -Iinclude -I$(BASE_BUILDOS)/arch/arm/include \
-mlittle-endian -I$(BASE_OSINC)/../arch/arm/mach-omap2/include -I$(BASE_OSINC)/../arch/arm/plat-omap/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -Os -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 \
-march=armv7-a -msoft-float -Uarm -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign \
-g -DUSE_UDEV=1 -DOS_LINUX -DLINUX_KERNEL
Everything should now be set up to compile your sample applications. To do this, you will need to compile the GPP source API, the GPP/DSP source code, and the GPP/DSP samples. If you receive any errors, check your three makefiles for the correct directory locations.
$ cd $DSPLINK/gpp/src/api
The GPP side executables will now be in $DSPLINK/gpp/export/BIN/Linux/OMAP3530 and the DSP side executables will be in $DSPLINK/dsp/export/BIN/DspBios/OMAP3530/OMAP3530_0. Both DEBUG and RELEASE executables are built. Also, a dsplinkk.ko module has been built which you can replace the existing module. Make a backup of the existing module. Copy these files to your target. In the code below, I have copied the DEBUG version of the dsplinkk.ko only and only the message executable. Also copy over any other sample applications you would like to test out such as ringio and loop.
$ mkdir ~/TI/moduleBackups
For more information, see: