Question about DSPlink test apps

178 views
Skip to first unread message

Paul McManus

unread,
Jan 11, 2010, 4:37:21 AM1/11/10
to beagl...@googlegroups.com

Hello,
      I am new to Beagle and linux in general. I am having two problems when attempting to set up DSPLINK.

I have built a kernel using the Beagle_omap configuration file and it is running with the ALSA Filesystem on the board. I have built the dsplink.ko and the lpm ko as well and I can load them using insmod. I ran lsmod and it looks as if they are loaded and /dev/dsplink is there.

[root@OMAP3EVM ti-dsplink]# lsmod
Module                  Size  Used by    Not tainted
lpm_omap3530            6321  0
dsplinkk              237949  1 lpm_omap3530


Question 1) However when I try to using the cache clearing executables (lpmON.lpmOFF )I get the following error message.

[root@OMAP3EVM bin]# ./lpmON.x470uC
==== LPM ON Test ====
app: LPM_open
Error: LPM_open failed

The lpm seems to be loaded though, I can see it in /dev

[root@OMAP3EVM /dev]# ls -l lpm*
brw-rw----    1                   253,   0 Jan  1 00:00 lpm0

I have looked in the forum and no-one seems to have reported this so I am assuming I have done something pretty stupid.


Question 2) When I run ./messagegpp message.out 1000 I get the following error.


[root@OMAP3EVM cmd_compiled]# ./messagegpp message.out 1000
========== Sample Application : MESSAGE ==========
Entered MESSAGE_Create ()
dsplink driver open: /dev/dsplink: No such device or address
PROC_setup () failed. Status = [0x80008008]
Leaving MESSAGE_Create ()
Entered MESSAGE_Delete ()
Assertion failed (IS_VALID_MSGQ (msgqQueue)). File : msgq.c Line : 478
MSGQ_release () failed. Status = [0x8000800b]
Assertion failed (((drvObj != NULL) && (IS_OBJECT_VALID (drvObj, SIGN_DRV))) ||1Assertion failed (IS_VALID_MSGQ (msgqQueue)). File : msgq.c Line : 329
Leaving MESSAGE_Delete ()

My loadmodules script uses mknod


# insert DSP/BIOS Link driver
#
insmod dsplinkk.ko
rm -f /dev/dsplink
mknod /dev/dsplink c `awk "/dsplink/ {print \\$1}" /proc/devices` 0


# insert Local Power Manager driver
#
insmod lpm_omap3530.ko
rm -f /dev/lpm0
mknod /dev/lpm0 c `awk "/lpm/ {print \\$1}" /proc/devices` 0

Can anyone think of an obvoius error ?

Regards
Paul McManus

Paul McManus
Senior Software Engineer
This email is sent and received in accordance with the terms and conditions as defined on our website. To view click here
Nautronix is a public limited company registered in Scotland. Registered number: SC062293. Registered office: Nautronix House, Howe Moss Avenue, Kirkhill, Dyce, Aberdeen, AB21 0GP
---------------------------------------------------------------------
This email has been scanned for Nautronix plc, 
by the Postini Message Security System.
---------------------------------------------------------------------

dave

unread,
Jan 11, 2010, 12:07:53 PM1/11/10
to Beagle Board
Does anything change if you load the lpm driver before dsplink?


On Jan 11, 3:37 am, "Paul McManus" <Paul.McMa...@Nautronix.co.uk>
wrote:

> www.nautronix.com:http://clicks.nautronix.co.uk/linktrack.php?ZWlkPTI1OTc1OTUmbGlkPTQzN...http://clicks.nautronix.co.uk/linktrack.php?ZWlkPTI1OTc1OTUmdWlkPTIxO...
> click here:http://clicks.nautronix.co.uk/linktrack.php?ZWlkPTI1OTc1OTUmbGlkPTU5N...


>
> ---------------------------------------------------------------------
> This email has been scanned for Nautronix plc,
> by the Postini Message Security System.
> ---------------------------------------------------------------------
>

>  nautronixlogo.jpg
> 15KViewDownload
>
>  nautronixfooter.jpg
> 7KViewDownload
>
>  316055f.jpg
> 54KViewDownload

Nils Pipenbrinck

unread,
Jan 11, 2010, 12:21:32 PM1/11/10
to beagl...@googlegroups.com
Paul McManus wrote:
> Question 1) However when I try to using the cache clearing executables (lpmON.lpmOFF )I get the following error message.
>
> [root@OMAP3EVM bin]# ./lpmON.x470uC
> ==== LPM ON Test ====
> app: LPM_open
> Error: LPM_open failed
>
> The lpm seems to be loaded though, I can see it in /dev
>
Have you tried running lpmON as root? For users access to /dev/lpm0 is
forbidden.


> dsplink driver open: /dev/dsplink: No such device or address
>

Does the /dev/dsplink node exists?

I've noticed that your load scripts remove and renew the nodes. for LPM
and dsplink this should not be nessesary. At least on my system the
kernel modules generate the nodes themselfs. You could try to just
insert the modules on a just booted system. insmod lpm_omap3530.ko
should do all the work since it also loads dsplink into the kernel.

Cheers,
Nils

Paul McManus

unread,
Jan 13, 2010, 4:22:32 AM1/13/10
to beagl...@googlegroups.com

Thanks for the suggestion Nils. I will give this a try today. By the way what websites can you suggest would be useful for me to follow to use DSPLINK on Beagle. At the moment I have been looking at the ones below.

http://ossie.wireless.vt.edu/trac/wiki/BeagleBoard_DSPLink#IntroductiontoDSPLink
http://wiki.davincidsp.com/index.php/Building_DSPLink_Applications
http://wiki.davincidsp.com/index.php/Building_DSPLink
http://wiki.davincidsp.com/index.php/Troubleshooting_DSPLink_configuration_issues

I am probably making the classic newbie mistake of mixing different configs and not really understanding them.

Cheers,
Nils

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

winmail.dat

Nils Pipenbrinck

unread,
Jan 13, 2010, 10:58:20 AM1/13/10
to beagl...@googlegroups.com
Paul McManus wrote:
> Thanks for the suggestion Nils. I will give this a try today. By the way what websites can you suggest would be useful for me to follow to use DSPLINK on Beagle.

I don't know about any other sites. There is very little information on
the net. Also it always depends on how you want to use dsplink. I for
example don't want any of the codec-engine stuff. I need a lightweight
solution, so the bare kernel-module and the user-space libraries is all
I need.

Setting everything up was easy. I just compiled dsplink against the
kernel I'm using (2.6.29 I think), linked my applications against the
new built dsplink user-space library and everything worked as it should.
Getting LPM running was a bit messy due to the lack of the user-space
library source, but in the end it worked as well.

> I am probably making the classic newbie mistake of mixing different configs and not really understanding them.
>

That is very likely the root of the problem..

Have you tried running lpmON as root in the meantime? Does it now work
as it should?

Cheers,
Nils Pipenbrinck

Paul McManus

unread,
Jan 14, 2010, 6:52:32 AM1/14/10
to beagl...@googlegroups.com
Thanks Nils,
I tracked down the problem to be not adding the correct Beagle
options in the configuration step using the prel script before building
the source. It seems fine now. Next up is playing with the memory
allocation, then benchmarking the DSP app with an FFT or something. I am
porting over an old app running on an ARM7 and ADSP2188 to either
OMAP3550 or BF537. I'll be embarrassing myself on the Blackfin forums
next 8-) .

Thanks for your replies
Paul

-----Original Message-----
From: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com]
On Behalf Of Nils Pipenbrinck
Sent: 13 January 2010 15:58
To: beagl...@googlegroups.com
Subject: Re: [beagleboard] Question about DSPlink test apps

Cheers,
Nils Pipenbrinck

saladino

unread,
Jan 14, 2010, 9:53:00 AM1/14/10
to Beagle Board
This is an excellent thread. I am very interested in running/
benchmarking FFTW or some TI Library FFT on the DSP from an
application on the linux side. Please post your findings. I don't
think I really need the codec-engine stuff. Just a simple FFT will be
nice. Can you post a step by step guide to setup the DSP for this
purpose or are the links from Paul my best bet? You mention that the
LPM was messy. Did you have to do anything special to get LPM running?

Thanks,
Saladino.

On Jan 14, 6:52 am, "Paul McManus" <Paul.McMa...@Nautronix.co.uk>
wrote:


> Thanks Nils,
>           I tracked down the problem to be not adding the correct Beagle
> options in the configuration step using the prel script before building
> the source. It seems fine now. Next up is playing with the memory
> allocation, then benchmarking the DSP app with an FFT or something. I am
> porting over an old app running on an ARM7 and ADSP2188 to either
> OMAP3550 or BF537. I'll be embarrassing myself on the Blackfin forums
> next 8-) .
>
> Thanks for your replies
> Paul  
>
> -----Original Message-----
> From: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com]
>
> On Behalf Of Nils Pipenbrinck
> Sent: 13 January 2010 15:58
> To: beagl...@googlegroups.com

> Subject: Re: [beagleboard]QuestionaboutDSPlinktest apps


>
> Paul McManus wrote:
> > Thanks for the suggestion Nils. I will give this a try today. By the
> way what websites can you suggest would be useful for me to follow to

> useDSPLINKon Beagle.


>
> I don't know about any other sites. There is very little information on

> the net. Also it always depends on how you want to usedsplink. I for


> example don't want any of the codec-engine stuff. I need a lightweight
> solution, so the bare kernel-module and the user-space libraries is all
> I need.
>

> Setting everything up was easy. I just compileddsplinkagainst the


> kernel I'm using (2.6.29 I think), linked my applications against the

> new builtdsplinkuser-space library and everything worked as it should.

Nils Pipenbrinck

unread,
Jan 14, 2010, 12:25:12 PM1/14/10
to beagl...@googlegroups.com
saladino wrote:
> This is an excellent thread. I am very interested in running/
> benchmarking FFTW or some TI Library FFT on the DSP from an
> application on the linux side.
I did a quick benchmark using the DSP_fft16x16 complex FFT function from
the TI dsplib. DSP was clocked at 360Mhz:


FFT-Size Time (average)
----------------------------
8 0.58 �s
16 0.30 �s
32 0.58 �s
64 0.96 �s
128 2.14 �s
256 4.03 �s
512 9.11 �s
1024 17.7 �s
2048 40.3 �s
4096 80.1 �s
8192 0.86 ms
16384 10 ms
32767 21 ms
65536 44 ms

(I hope the table comes out nice).

Btw, the big leap at 8192 samples is due to the fact that the data does
not fit into the cache anymore. the library doesn't do any DMA and
internal RAM management, so it starts to crawl as soon as cache misses
start to occur.

I hope this table is what you've been looking for.


> Can you post a step by step guide to setup the DSP for this
> purpose or are the links from Paul my best bet?

I thought about writing one, but I see the problem that with the next
dsplink release it becomes wrong and may only confuse people. But it's
not rocket science. The dsplink archive has a nice installation guide.
If you follow it step by step and apply common sense it is not that hard.

If there is enough interest I could write something up though...


> Did you have to do anything special to get LPM running?
>

Yes. The sources of the user-mode libraries are missing in the TI package.

Instead you find two precompiled libraries of which one after some
tweaking works. The library references two mysterious symbols (some
transport layer stuff which I never heard of ). Fortunately the lib only
references the symbols but never calls them, so it's fine to just
declare them somewhere. That makes the linker happy.

Cheers,
Nils Pipenbrinck

Koen Kooi

unread,
Jan 14, 2010, 12:42:51 PM1/14/10
to beagl...@googlegroups.com
Op 14 jan 2010, om 18:25 heeft Nils Pipenbrinck het volgende geschreven:

> Can you post a step by step guide to setup the DSP for this
>> purpose or are the links from Paul my best bet?
> I thought about writing one, but I see the problem that with the next
> dsplink release it becomes wrong and may only confuse people. But it's
> not rocket science. The dsplink archive has a nice installation guide.
> If you follow it step by step and apply common sense it is not that hard.
>
> If there is enough interest I could write something up though...

With OpenEmbedded you need to do 2 steps:

1) download TI codegen 6.1.9
2) 'bitbake ti-dsplink-module'

That will build a dsplink that matches the angstrom kernel and leave a tree in staging you can build against. You even get an include file that sets all the FOO_INSTALL_DIR vars for you!

regards,

Koen

saladino

unread,
Jan 18, 2010, 6:08:29 PM1/18/10
to Beagle Board
Where do I get TI codegen 6.1.9 ? I don't really know what it is.
where do I put it ?
and Nils, Thanks for sharing your numbers.

Thanks.

Nils Pipenbrinck

unread,
Jan 19, 2010, 10:40:09 PM1/19/10
to beagl...@googlegroups.com
saladino wrote:
> Where do I get TI codegen 6.1.9 ? I don't really know what it is.
>
It's the compiler for DSP executables. It can be found here:

https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm

You may have to register, but it's free.

Btw, since an hour I'm using version 6.1.13. Got a nice 15% speed-up on
some routines.

Cheers,
Nils

saladino

unread,
Jan 20, 2010, 7:02:59 AM1/20/10
to Beagle Board
Does it compile from C code?

Thanks,
Saladino.

On Jan 19, 10:40 pm, Nils Pipenbrinck <n...@planetarc.de> wrote:
> saladino wrote:
> > Where do I get TI codegen 6.1.9 ?  I don't really know what it is.
>
> It's the compiler for DSP executables. It can be found here:
>

> https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/down...

Nils Pipenbrinck

unread,
Jan 20, 2010, 9:59:01 AM1/20/10
to beagl...@googlegroups.com
saladino wrote:
> Does it compile from C code?
>
Aehm.. The compiler (Code generatio tools) is a binary distribution.
Comes for Win32, Linux and since recently Solaris.

It can compile C and C++ code.

Cheers,
Nils

tanzeel...@gmail.com

unread,
May 10, 2014, 3:29:29 PM5/10/14
to beagl...@googlegroups.com
I want to compile my c code for beagleboard to use dsplink and opencv ...how can i compil the code on beagleboard or on thr host machine
any suggestions or ideas ?? 

Tanzeel Ur Rahman

unread,
May 12, 2014, 1:01:02 PM5/12/14
to beagl...@googlegroups.com
can you give me some more detailed help on it please ???


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/wwG2mvA0Qqg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages