Question about DSPlink test apps

nautronixlogo.jpg

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

nautronixfooter.jpg

316055f.jpg

Does anything change if you load the lpm driver before dsplink?

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

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.

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

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 :sunglasses: .

Thanks for your replies
Paul

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.

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)

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

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.

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

Does it compile from C code?

Thanks,
Saladino.

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

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 ??

can you give me some more detailed help on it please ???