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.
This guide will show you how to compile DSPLink from source specifying the target platform as the BeagleBoard. Once finished compiling from source, you also have a working host environment to compose and compile your own applications.
There are two main ways of compiling applications for TI's DSPs. One of which is Code Composer Studio, a full development studio to compile DSP applications. The drawbacks of this option is the high software licensing cost and that it is only compatible with Windows OS. A second option is to compile applications through command line using tools from TI such as the Code Generation Tools. This has the advantage of compiling applications on a wide variety of host operating systems including Linux and Windows. Additionally the software required is free on TI's website.
This guide will walk you through setting up a Linux host system (Ubuntu 8.04) to compile applications from command line. Please see TI's UserGuide for full instructions on how to compile on other host systems or for more advanced settings. The UserGuide is located in the doc folder of the soon-to-be downloaded DSP/BIOS Link tar.
The guide expects the user to have successfully completed the OpenEmbedded steps and created an x11-image. Additionally, it is necessary to copy files from the host system to the target BeagleBoard. Two options of doing this is to plug the SD card in the host system or to use a file transfer protocol such as zmodem to transfer the files. If you would like to use the latter, please see the instructions for setting up zmodem on the BeagleBoard.
There are multiple files needed to begin building applications in DSPLink. Registration at the TI website is needed for all files from TI and the user license(s) must be accepted.
Download the DSP/BIOS Link. I used version 1.61.03 for linux. http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent//link/index.html
Untar the file to your home directory. Assuming you downloaded dsplink_1_61_03.tar.gz to you Desktop, enter the following commands.
$ cd ~/
A Linux Kernel is needed to compile DSPLink applications. The linking Kernel must be the same version or a compatible version with the Kernel installed on the BeagleBoard.
Fortunately, our OpenEmbedded build created enough of a kernel to use for compiling DSPLink. This kernel is located at ~/oe/tmp/staging/. Therefore, there is nothing to download as long as the OpenEmbedded process was followed.
You will need to download and install three binary files: C6x Compiler, DSP/BIOS Link, and XDCtools.
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 home directory. The installation of each binary file should be located as such:
Download the Local Power Manager (LPM). I used LPM version 1.23.01 which can be found at http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent//linuxutils/linuxutils_2_23/index.html . Untar the file in your TI directory and then untar ti_bios_power,omap3530.tar.
$ cd ~/TI
This UserGuide uses the Platform Support Package (PSP) for the linux kernel it includes. Since we are using the Kernel from OpenEmbedded?, the PSP is not necessary to be downloaded or installed. Therefore, this is optional as there are other uses for the PSP outside the scope of this guide. If you decide to download, download the OMAP35x PSP release 02.00.00.01 as this release matches the DSPLink guide's release. http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent//psp/omap35x/index.html
There are a number of directories DSPLink looks for when compiling. To tell DSPLink where to find these, there are three make files that need to be tailored to your environment. The three 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.
When working with DSPLink, it is necessary to set an environment variable for the DSPLink directory. You can use the second command to add it to your default terminal shell.
$ export DSPLINK=$HOME/dsplink_1_61_03/dsplink
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
$ cd omap3530/lpm
Find the lines similar to this and add the following lines below it.
#LINUXKERNEL_INSTALL_DIR = _your_kernel_installation_
Now perform make and it will create the lpm_omap3530.ko module needed. Remove any existing LPM module and then copy this module to the target in the proper location. You may want to backup the existing LPM module if it exists. In the code below, replace <target> with the location of your target files system, i.e. /media/disk-1 if transferring directly to SD card.
You will also need the lpmON and lpmOFF executables to reset the DSP. They have already been built for use on the omap3530. There are both DEBUG and RELEASE versions so you can copy both sets if unsure.
$ cd <target>/usr/share/ti-dsplink/
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
Download the loadmodules.sh and unloadmodules.sh which are attached to this wiki. Change permissions of each script and then copy them to the beagle. These scripts will load/unload both the dsplinkk.ko and lpm_omap3530.ko modules. Assuming you downloaded the scripts to the Desktop:
$ cd ~/Desktop
Now that you have copied your executables, modules, and scripts to your target file system, ensure the SD card is in the BeagleBoard and then turn it on. It is required to run the loadmodules.sh script to load both dsplink and lpm modules. Verify that both were loaded using the lsmod command.
root@beagleboard:~/# cd /usr/share/ti-dsplink
If you would like to load the script on bootup, you can add the script to init.d and use the update-rc.d command.
Use the following commands to copy the loadmodules script to the init.d folder and perform update-rc.d. The option "defaults" will start the script at the different runlevels specified by "defaults".
root@beagleboard:~# cp /usr/share/ti-dsplink/loadmodules.sh /etc/init.d/
Reset the BeagleBoard. During bootup, it should have loaded the dsplinkk.ko and lpm_omap3530.ko modules. You can verify that both are loaded using the lsmod command.
You should now be ready to run the sample applications. Enter the ti-dsplink directory and run GPP/DSP executables with appropriate parameters for the applications.
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.
Ringiogpp provides Ring Buffer based data streaming between the GPP and DSP. 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.
For more information, see:
注：Installing DSPLink on a BeagleBoard Outside OpenEmbedded from Source（原文出处，翻译整理仅供参考!）