Re: Simple steps to get BeaglBoardxM and DSP working?

1,758 views
Skip to first unread message

richard taylor

unread,
Feb 21, 2013, 5:19:05 PM2/21/13
to beagl...@googlegroups.com, jmw...@unm.edu


On Thursday, February 21, 2013 12:54:11 PM UTC-8, jmw...@unm.edu wrote:
I realize that this has been addressed many times, but all of the info I have found so far has led me nowhere.  So I would like to ask for a simple approach to get the BeagleBoardxM working with the DSP either through DSPLINK, SYSLINK or any other mechanism.

I simply want to be able to run code on the DSP and interact with it through linux on the ARM processor.

I have downloaded and installed all of the angstrom demo images that I could find, but none of them seem to support the dsplink. 
I have used narcissus to build and install images, but can never get anything to load dsplinkk.ko
I have found and followed many tutorials and tried to follow them, but always find some step that is obsolete or some other reason why it won't compile or can't find this or that dependency.
I even bitbaked the angstrom build system and compiled my own, and still have achieved nothing but frustration.

I am familiar with Linux and build tools and such.  I have installed and used code composer studio and the TI command line build tools.  I do not need any fancy debug environment.  I just want the ARM to run angstrom (or whatever linux is best suited for it) and be able to compile and load my own DSP code onto the 67x processor for real-time operations.

So, what is the current, best way to load, run and communicate with the DSP.  DSPLINK?  SYSLINK?

Is there an Angstrom img or tar file that I can put on my SD card that will support the DSP communication without me having to rebuild the kernel or reconfigure something?  If such an image does not exist, is there one that can be easily configured to do this (without recompiling the whole system).  Surely someone out there has built such an image.

Any help is appreciated.

Thanks,
Nathan West

I suspect I'm talking past your question, but I have found when compiling code, the DSP features of GCC do make a different in the code efficiency, based on running CPU monitors to see how much of the processing power the program is using. The flags can be found here:

 http://processors.wiki.ti.com/index.php/Cortex-A8

Opensuse for arm has some tips and downloads for DSP.

Scott Baillie

unread,
Jun 5, 2013, 11:42:12 AM6/5/13
to beagl...@googlegroups.com, jmw...@unm.edu
There are no simple steps to work with the C64x DSP processor on the beagleboard xm , but if you are persistent , you can get it
working as I have with the following steps. I have copied these instructions from another post in this forum , so sorry for the duplication.
The c64x processor on the DM3730 omap processor on the beagle board xm is a fixed point processor so don't try and write any
floating point code because it is slow , you need to write code that is fast on a fixed point processor.

I recommend  the use of the IQ fast maths lib which is downloadable  from the Texas Instruments site , use this link to find the library :

http://processors.wiki.ti.com/index.php?title=Software_libraries

The following is a duplication of another post I made on this forum :

-----------------------------------------------------------------------------------------------------
There are various methods of developing dsp software for the beagle board xm.

They are :

- dsplink
- syslink
- c6run
- tidspbridge

If you are using linux, my strong recommendation is the tidspbridge driver that exists in the staging area of the linux kernel.

The tidspbridge driver is actively maintained , exists in the kernel and can be used on 2.6 kernels all the way up to the latest 3.9 series kernels.

The dsplink driver is not actively maintained and is designed for the 2.6 series kernels but I have built it for the 3.6.7 kernel but it was difficult.
The open embedded environment does have the ability to build the dsplink driver but I dont know how well maintained it is, Texas instruments are no longer maintaining it.
I have not tried to build the syslink driver for linux and it seems difficult to do.
The c6run approach is not really a valid approach to dsp programming because you lose to much control and it is not very flexible.

So , in my view , use the tidspbridge approach , I am using that approach and find it very powerfull.

I use the dsp samples provided by TI as a framework for my own code , I delete the contents of one of the dsp sample applications and
add my own code to the file. Using this approach , I dont have to learn the build system , I build the dsp samples but it produces my application instead.

The dsp samples can be obtained from here :

git clone git://dev.omapzoom.org/pub/scm/tidspbridge/userspace-dspbridge.git

Follow the instructions from here ( note the instructions are out of date but still help ):

http://elinux.org/BeagleBoard/DSP_Howto

you need to install these TI tools ( and the same version of the tools ) to build the samples :

bios_5_33_04
xdctools_3_10_02
C6000CGT6.0.7

the download links for the above tools are :

http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/bios/index.html
http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/index.html
https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm


I needed to install the older stdc++ library :
Install compat stdc++ library ( libstdc++.so.5 )

I also needed to make a symbolic link :
ln -s /opt/TI/C6000CGT6.0.7 /usr/local/cgt6x-6.0.7

After that , everything builds and runs fine on a modern linux distribution.

Note that the dsp-bridge API is not documented on the DSP side but it is documented on the ARM side so you
have to use the sample code to deduce the DSP side API. Its not that hard because it is almost identical to the
API on the ARM side.

The documentation for the DSP bridge can be found here :

http://www.openomap.org/pub/dspbridge/db_linux_rguide.pdf
http://www.openomap.org/pub/dspbridge/db_linux_pguide.pdf

-----------------------------------------------------------------------------------------------------

It works for me , so it is possible to write DSP code, let me know if you need more information.

Scott.


scott.a...@gmail.com





ozka...@gmail.com

unread,
Jul 26, 2013, 8:03:52 AM7/26/13
to beagl...@googlegroups.com, jmw...@unm.edu
Hi there,

I have just tried to use DFD (http://processors.wiki.ti.com/index.php/Beagle_Board_Challenge:_SuperBeagle) to see if I am able to compile and run a dummy example of ARM+DSP usage on my BB-xM. I have achieved to install cross-compile related tools into Ubuntu-PC and get two files at the end of "make". The files I have are "dummy" and "dummy.dll64P".

I have copied both of them to /lib/dsp folder my BB=xM and run the following command: "sudo ./dummy".
But BB-xM says: "unable to execute ./dummy: No such file or directory"

Any idea? What am I missing during the process?

One point I'd like to mentioned here is about libstdc++5. During the cross compilation process in my Ubuntu-PC I had to install libstdc++5 package in order to generate dll file. However, this package is not installed in my BB-xM. I am not sure if this can cause the problem to run ./dummy executable.

Looking forward to your replies.
Thanks in advance.

Regards,
Ozkan.

Robert Nelson

unread,
Jul 26, 2013, 8:28:35 AM7/26/13
to beagl...@googlegroups.com
On Fri, Jul 26, 2013 at 7:03 AM, <ozka...@gmail.com> wrote:
> Hi there,
>
> I have just tried to use DFD
> (http://processors.wiki.ti.com/index.php/Beagle_Board_Challenge:_SuperBeagle)
> to see if I am able to compile and run a dummy example of ARM+DSP usage on
> my BB-xM. I have achieved to install cross-compile related tools into
> Ubuntu-PC and get two files at the end of "make". The files I have are
> "dummy" and "dummy.dll64P".
>
> I have copied both of them to /lib/dsp folder my BB=xM and run the following
> command: "sudo ./dummy".
> But BB-xM says: "unable to execute ./dummy: No such file or directory"
>
> Any idea? What am I missing during the process?

When you cross-compiled the application did you build with gcc
compiler built for "gnueabi" to run on an "armel" system or
"gnueabihf" for an "armhf" system..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

ozka...@gmail.com

unread,
Jul 26, 2013, 10:03:29 AM7/26/13
to beagl...@googlegroups.com
> When you cross-compiled the application did you build with gcc
> compiler built for "gnueabi" to run on an "armel" system or
> "gnueabihf" for an "armhf" system..

I have tried the following both cases in Makefile of "dsp-for-dummies"
   CC := arm-linux-gnueabihf-gcc
   CC := arm-linux-gnueabi-gcc
But, the same error occurs.

How can I check and ensure about if I did built the images with gnueabi/armel or gnueabihf/armhf?

Regards,
Ozkan.

Robert Nelson

unread,
Jul 26, 2013, 10:07:14 AM7/26/13
to beagl...@googlegroups.com
On Fri, Jul 26, 2013 at 9:03 AM, <ozka...@gmail.com> wrote:
>> When you cross-compiled the application did you build with gcc
>> compiler built for "gnueabi" to run on an "armel" system or
>> "gnueabihf" for an "armhf" system..
>
> I have tried the following both cases in Makefile of "dsp-for-dummies"
> CC := arm-linux-gnueabihf-gcc
> CC := arm-linux-gnueabi-gcc
> But, the same error occurs.
>
> How can I check and ensure about if I did built the images with
> gnueabi/armel or gnueabihf/armhf?

You can check your bin with ldd..

For example on my debian armhf system.

ubuntu@arm:~$ ldd /bin/nano
libncursesw.so.5 => /lib/arm-linux-gnueabihf/libncursesw.so.5 (0xb6f56000)
libtinfo.so.5 => /lib/arm-linux-gnueabihf/libtinfo.so.5 (0xb6f34000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e51000)
/lib/ld-linux-armhf.so.3 (0xb6f7f000)
<- "armhf" linker...
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6e46000)

ozka...@gmail.com

unread,
Jul 26, 2013, 11:02:24 AM7/26/13
to beagl...@googlegroups.com
Hi again,

Just to confirm, the executable (dummy) now works in BB-xM after I reinstall gcc-arm-linux-gnueabihf into Ubuntu-PC.

   apt-get install gcc-arm-linux-gnueabihf
   CC:= arm-linux-gnueabihf-gcc

Regards,
Ozgur. 

Nathaniel Lewis

unread,
Jul 26, 2013, 6:49:21 PM7/26/13
to beagl...@googlegroups.com
Does this work on current versions of the kernels?  Considering 3.11 is going to be awesome with the fact that 1 GHz on the ARM core works again?  I noticed in the 3.11 kernel, the TI DSPLINK driver disappeared from the kernel.  And TI has been developing OpenCL for the C6000 DSPs for over year now, the page was updated last August.  And the C6000 isn't even the one in the Beagleboard.  So what do we do from now on?

- Nathaniel Lewis


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Robert Nelson

unread,
Jul 26, 2013, 6:57:43 PM7/26/13
to beagl...@googlegroups.com
On Fri, Jul 26, 2013 at 5:49 PM, Nathaniel Lewis
<linux.r...@gmail.com> wrote:
> Does this work on current versions of the kernels? Considering 3.11 is
> going to be awesome with the fact that 1 GHz on the ARM core works again? I
> noticed in the 3.11 kernel, the TI DSPLINK driver disappeared from the
> kernel. And TI has been developing OpenCL for the C6000 DSPs for over year
> now, the page was updated last August. And the C6000 isn't even the one in
> the Beagleboard. So what do we do from now on?

s/DSPLINK/dspbridge/g

This dspbridge driver relies on the mailbox driver, which just went
thru a mult-arch rewrite in v3.11-rcX.. However we need the omap bits
next, which i think where just posted for v3.12 on linux-omap...

So, if grab those, it might work..

Robert Nelson

unread,
Jul 26, 2013, 6:59:40 PM7/26/13
to beagl...@googlegroups.com
http://www.spinics.net/lists/linux-omap/msg94306.html

note, might be painful for us: "I have tested this on Beagle-XM,
Panda4 and OMAP5 uEVM (with
out-of-tree clock patches)."

Nathaniel Lewis

unread,
Jul 26, 2013, 11:03:45 PM7/26/13
to beagl...@googlegroups.com
I think that "out of tree" clock patch may be the one i included with Beagleboard xM 1 GHz patch.  I found it on some mailing list.  Put the link in the patch description.  But either way, at least it hasn't been forgotten.

- Nathaniel Lewis


Claus Anders

unread,
Oct 28, 2013, 1:40:44 AM10/28/13
to beagl...@googlegroups.com, jmw...@unm.edu
I tried variations of DSP support for Linux 3.2 Angstrom distro.
For DSPBridge, I got:
26:      16264      INTC
 28:          0      INTC  DspBridge    iommu fault

which supposedly means, mailbox_mach.ko is not loaded (which doesn't exist)
For DSPLink I got:

[ 1422.245300] DSP-side configuration mismatch/failure
[ 1422.253448] 0              -> success
[ 1422.260131] Positive value -> DSP-side failure code.
[ 1422.268188] (Uint32) -1    -> DSP-side component was not initialized.
[ 1422.268218]
[ 1422.282135]     ProcId received : 0, Expected : 0
[ 1422.289916]     DRV configuration status    [0xffffffff]
[ 1422.298614]     IPS configuration status    [0xffffffff]
[ 1422.306945]     POOL configuration status   [0xffffffff]
[ 1422.315368]     MPCS configuration status   [0xffffffff]
[ 1422.323730]     MPLIST configuration status [0xffffffff]
[ 1422.332122]     MQT configuration status    [0xffffffff]
[ 1422.340545]     DATA configuration status   [0xffffffff]
[ 1422.348968]     RINGIO configuration status [0xffffffff]
Looks like a memory setting issue in uEnv.txt, for which I can't find any working solution.

SYSLink is in a beta state, which makes me wonder, if it will work.
C6Run is not supported anymore and depends either on DSPLink or SYSLink.
Then we have CE, which also depends on DSPLink. OpenCL or RCM are not available.

So the only options seems to get DSPLink or BridgeDriver working.
What is the current state of DSP support for Angstrom Linux 3.2 on Beagleboard xM?

opmd...@googlemail.com

unread,
Jan 30, 2015, 3:19:16 AM1/30/15
to beagl...@googlegroups.com, jmw...@unm.edu
Hey scott,
 I am trying quite the same thing as you did also with this example: git://dev.omapzoom.org/pub/scm/tidspbridge/userspace-dspbridge.git, following these instructions: http://elinux.org/BeagleBoard/DSP_Howto. I get the dspbrdigedriver working, can compile the dsp side binaries and the gpp side binaries. When I start the ping.out, then the error "DSPNode_Create failed 0xffffffe3".
 
Did you change some settings in the .tci files? I do not really understand what is done in these files.
 
Would be happy about soem nice answers ;-)
Best regards,
Michael
Reply all
Reply to author
Forward
0 new messages