Version 7 (modified by ravishi, 4 years ago)

--

Guide to Installing DSPLink on a BeagleBoard

Introduction

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.

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

Downloading and Installing Files

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 forums, were:

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
$ chmod +x bios_setuplinux_5_33_02.bin

Run the binary file to open a graphical installer

$ ./bios_setuplinux_5_33_02.bin

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:

  • BIOS 5.33.02 -> $HOME/TI/bios_5_33_02
  • XDCtools 3.10.03 -> $HOME/TI/xdctools_3_10_03
  • C6x Compiler -> $HOME/TI/cg6x_6_0_16

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
$ cp codec_engine_2_21.tar.gz $OE_HOME/tmp/downloads
$ md5sum $OE_HOME/tmp/downloads/codec_engine_2_21.tar.gz > $OE_HOME/tmp/downloads/codec_engine_2_21.tar.gz.md5

Changing Configuration Settings

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
TITOOLSDIR = "/home/user/TI"
# Path under TITOOLSDIR where dspbios is unpacked
TIBIOSDIR = "bios_5_33_02"
TIXDCTOOLSDIR = "${TITOOLSDIR}/xdctools_3_10_03"
# Path under TITOOLSDIR where the dsp toolchain is unpacked
TICGTOOLSDIR = "cg6x_6_0_16"

Bitbake and Install

Now enter openembedded shell, update, and bitbake ti-codec-engine

$ source $OE_HOME/beagleboard/beagleboard/profile.sh
$ cd $OE_HOME
$ git checkout origin/stable/2009 -b stable/2009
$ git pull
$ bitbake ti-codec-engine

Bitbake should complete successfully. Once completed, the following packages are added to $OE_HOME/tmp/deploy/glibc/ipk/beagleboard directory:

  • ti-cmem-module_221-r19.1_beagleboard.ipk
  • ti-lpm-module_221-r19.1_beagleboard.ipk
  • ti-sdma-module_221-r19.1_beagleboard.ipk
  • ti-codec-engine-apps_221-r19.1_beagleboard.ipk
  • ti-codec-engine-dbg_221-r19.1_beagleboard.ipk
  • ti-codec-engine-dev_221-r19.1_beagleboard.ipk
  • ti-dsplink-apps_221-r19.1_beagleboard.ipk
  • ti-dsplink-module_221-r19.1_beagleboard.ipk

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

BeagleBoard Configuration

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
root@beagleboard:/usr/share/ti-dsplink# ./loadmodules-ti-dsplink-apps.sh
You have 60916kB total memory for Linux                                         
[  663.001068] DSPLINK Module (1.60) created on Date: Jun 15 2009 Time: 17:38:41

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/
root@beagleboard:~# cd /etc/init.d/
root@beagleboard:~# update-rc.d loadmodules-ti-dsplink-apps.sh defaults
 Adding system startup for /etc/init.d/loadmodules-ti-dsplink-apps.sh. 

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.

Sample Applications

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

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:
messagegpp <absolute path of DSP executable> <number of transfers> <DSP Processor Id>
The following contains test arguments and the resulting output.

root@beagleboard:/usr/share/ti-dsplink#  messagegpp message.out 1000
========== Sample Application : MESSAGE ==========                              
Entered MESSAGE_Create ()                                                       
Leaving MESSAGE_Create ()                                                       
Entered MESSAGE_Execute ()                                                      
Transferred 100 messages                                                        
Transferred 200 messages                                                        
Transferred 300 messages                                                        
Transferred 400 messages                                                        
Transferred 500 messages                                                        
Transferred 600 messages                                                        
Transferred 700 messages                                                        
Transferred 800 messages                                                        
Transferred 900 messages                                                        
Transferred 1000 messages                                                       
Leaving MESSAGE_Execute ()                                                      
Entered MESSAGE_Delete ()                                                       
Leaving MESSAGE_Delete ()                                                       
====================================================  

ringio_gpp

Ringiogpp provides Ring Buffer based data streaming.. It expects the user to start the application in the following format:
Usage : ./ring_iogpp <absolute path of DSP executable> <RingIO data Buffer Size in bytes> <number of bytes to transfer><DSP Processor Id>
The following contains test arguments and the resulting output.

root@beagleboard:/usr/share/ti-dsplink# ./ring_iogpp ringio.out 1024 4096       
========== Sample Application : RING_IO ==========                              
Bytes to transfer :4096                                                         
Data buffer size  :1024                                                         
Entered RING_IO_Create ()                                                       
Leaving RING_IO_Create ()                                                       
Entered RING_IO_WriterClient ()                                                 
GPP-->DSP:Sent Data Transfer Start Attribute                                    
Entered RING_IO_ReaderClient ()                                                 
GPP-->DSP:Sent Data Transfer Start Notification                                 
GPP<--DSP:Received Data TransferStart Attribute                                 
GPP-->DSP:Total Bytes Transmitted  4096                                         
RingIO_setAttribute succeeded to set the  RINGIO_DATA_END. Status = [0x8100]    
GPP-->DSP:Sent Data Transfer End Attribute                                      
GPP-->DSP:Sent Data Transfer End Notification                                   
Leaving RING_IO_WriterClient ()                                                 
GPP<--DSP:Received Data TransferEnd Attribute                                   
GPP<--DSP:Bytes Received 4096                                                   
GPP<--DSP:Received Data Transfer End Notification                               
Leaving RING_IO_ReaderClient ()                                                 
Entered RING_IO_Delete ()                                                       
Leaving RING_IO_Delete ()                                                       
==================================================== 

For more information, see:
 http://elinux.org/BeagleBoard/DSP_Howto
 https://gstreamer.ti.com/gf/project/gstreamer_ti/wiki/?pagename=BuildingWithAngstrom
 http://groups.google.com/group/beagleboard/browse_thread/thread/3d2560c087941100
 http://www.pixhawk.ethz.ch/wiki/tutorials/omap/dsplink

Attachments