Wednesday, May 26, 2010

Building DSP/Link with OpenEmbedded

I'll be shortly making a post about how the traditional DSP development cycle with DSP/Link works to further emphasize why C6Run and DSP-RPC-POSIX (that'd be my GSoC project's name :)) are needed. But before that, I though I'd talk a little about setting up DSP/Link -which is a vital component for doing DSP development on OMAP3530 in the preferred way- using OpenEmbedded.

Start off by building the ti-dsplink recipe:

bitbake ti-dsplink

(if, for some reason, you want only the kernel module for dsplink, you can use the ti-dsplink-module recipe instead - the ti-dsplink recipe contains both the module and the samples)

This should result in several package files in your OE deployment directory (something like ~/oe/setup-scripts/build/tmp-angstrom_2008_1/deploy/glibc/ipk), which can be transferred to your Beagle (by directly copying them to the SD, by networking, by nfs...the options are endless - I personally mount the beagle via sshfs on my host machine) and then installed with opkg install

That's all there is to building and install DSP/Link, really! You can invoke the provided examples by cd'ing into /usr/share/ti/ti-dsplink-examples and then:
  1. ./ti-dsplink-examples-loadmodules.sh to load the kernel modules. Note that you should have your bootargs configured to leave several megabytes of memory to the DSP/Link module. You may get a warning on the newer Beagles with 256 megs of RAM even if your bootargs are configured correctly, since the script just checks if you have more than 126 megs allocated for the kernel, so no panic.
  2. ./ti-dsplink-examples-run.sh to run all the examples with some default parameters - you can examine the contents of this file to see how particular examples are invoked. Aside from the second parameter (which is the DSP executable name) and the last (which is the DSP ID), playing around with the parameters should be safe.
  3. ./ti-dsplink-examples-unloadmodules.sh to optionally unload the modules once you're done.

3 comments:

  1. May I ask what you passed as kernel arguments to run the dsplink examples?

    With almost the same procedure the module loads fine on my beagleboard C4, but the examples fail to run (maybe because of a memorymap problem)

    ReplyDelete
  2. Should be 192 megs IIRC (I have a BeagleBoard rec C4, with 256 megs of RAM).

    ReplyDelete
  3. I find the OE recipes use the default memorymap as defined by CFG_OMAP3530_SHMEM.c and dsplink-omap3530-base.tci, which for OMAP3530 is setup for the DSP to start using memory at 126MB. I believe you have to define a new memory map if you want to give memory above that to linux. Do you have any advice on this?

    ReplyDelete