This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to use the DSP from linux on the ARM using SYSBIOS

Other Parts Discussed in Thread: SYSBIOS

Forgive me - I am beginning to feel a bit stupid .. but, after some days now of going through manuals, experimenting with CCS, and so on, I still cannot find a clear explanation of how to use the DSP from a program running under linux on the ARM side.  Basically we would like to be able to farm out some intensive algorithm processing to the DSP from inside a program running in linux.  It is not a video codec problem so the canned solutions for graphics don't really apply.  And after several days of trying to figure out what is going on I am still confused .. There are _some_ unofficial examples for the older DSP/BIOS - but I see everywhere recommendations to use SYSBIOS.  And I have thus far failed to even understand these simple things:

1. How to load and execute code on the DSP from linux - obviously this must be done at a lower level than clicking "Run" in CCS (which will not be running on the target ..). Ie. we need to run this either as a library call from our code (prefered) or a system() call on a external executable and receive the result of calculations.

2. In order to do this is it necessary to _already_ have booted SYSBIOS on the DSP? If so, how is this accomplished?

3. If #2 is necessary, again - how to then execute code from the linux side?  And, ultimately, is it possible to call from a running process on the linux side to execute arbitrary code or will it be necessary to use a system call to execute a separate process to be loaded on the DSP?

The sort of answer I am trying to work out is in the form of low level specific instructions that will execute the code on the DSP - working out the build is not so much of a puzzle; what to do with the executable is the problem.  I have no problem with the linux side, getting the necessary modules built and loaded, etc. and can probably deduce from the TI tools how to compile code for the DSP - I just don't understand how to get code _onto_ the DSP, execute it and read the result.

There seem to be some limited examples for this sort of thing using the older DSPBIOS/dspbridge (and maybe we will simply have to go that route) but I can find little of immediate practical use or clarification for SYSBIOS.  I have gone over the SYSBIOS and SYSLINK guides, quickstarts, attempted from CCS, etc .. all week - it is _still_ not clear and I'm running up against time at this point ...

Thanks very much in advance for any help, clues, links, etc.

  • Hi Erik,

    I have quiet the same problem, using the DSP out of Linux, what I found so far is a Linux module "DSP Link". I don't have this way running right now, so if you get any progress please let me know.

    best regards

    Pay Gießelmann

  • Hi Pay,

    A _little_ progress: Deep in the SYSBIOS user guide (http://www.ti.com/litv/pdf/sprugo6e) under the section "Threading Modules" there is a description of SYSBIOS start up - which seems to indicate that one boots the DSP and loads RTOS with library calls that are part of the DSP side application.  This is still not very clear to me and it appears to require the presence of XDCTools on the target - this looks a little like the older solution with C6Run/Dspbridge but not so elegant. There is also some reference to running a "server" that loads the OS on the DSP instead (thus eliminating the need for system initialization) - but I haven't found anything more on that.

    Actually, the older solution has better documentation and is easier to use - in fact we may revert to that approach.  Basically one loads the tidspbridge module (now in the mainline linux kernel) with an argument specifying the BIOS base image - this prepares the DSP side. Then calls from code on the ARM side connect to a "node" on the DSP via the kernel module - its similar to using any other device driver. There are also more example for this. eg. http://elinux.org/BeagleBoard/DSP_Howto is a good starting point and there is gstreamer code that might help for examples of usage. The C6Run framework also looks usable but I haven't tried it yet.

    Mostly my own confusion is with SYSBIOS - but it is starting to look like too much trouble for our fairly simple needs.  Since DSPBIOS/dspbridge and friends all are based on a module in the mainline kernel, more mature and more generally understood and used I think it may actually be a better solution.

  • Hi Erik,

    I find myself in a very similar situation as you. From my searching, DSP/BIOS with the linux kernel DSP bridge looks like the easiest option with the best documentation. My build already has the kernel module, I should just be able to link against a static lib and do whatever I want to talk to the DSP application. The only problem is that DSP/BIOS and BIOS Bridge are deprecated by Ti. From what I can tell, you "should" be using SYS/BIOS with syslink to do this stuff but I cannot find any reasonable documentation on the matter. I am further troubled by the fact that Syslink apparently only support up to Linux kernel 2.6.37 from January 2011, the latest version won't compile on 3.x kernels.

    C6Run framework looks like a very nice solution to this problem, but that's even worse off than DSP/BIOS as that has been marked End of Life.