[maemo-developers] [maemo-developers] DSP programming

From: Simon Pickering S.G.Pickering at bath.ac.uk
Date: Wed Jan 17 13:23:12 EET 2007
I've been trying to get started with DSP programming, following the
instructions summarised in this post. 

> I just took a brief look at what is required for programming 
> for the DSP in the 770. It seems that building your own 
> modules is possible with publically awailable tools and 
> documents. At least I got the demo_console from DSP gateway 
> loaded and it seems to run OK.
> The following is what I did. Someone might be interested in 
> testing the instructions and maybe polish these into a proper 
> HOWTO to the maemo wiki.


> 3. Get the avs_kernel.out from your 770
> The dynamically loaded DSP modules are linked against a dummy 
> kernel object generated from the actual kernel. The DSP 
> kernel is in /etc/dsp directory. Just copy it to your host 
> and adjust dspgw-3.3-dsp/apps/demo_mod/Makefile to use the 
> 770 avs_kernel.out to generate the dummy_kernel.obj instead 
> of using the default tinkernel.out. Now you should be able to 
> build the DSP side of the demo console with simple make.

After building the dsp side of the demos (demo_console or demo_fb), the next
step should be to run coff_unresolve on the resultant .out file, to remove
the dummy kernel, which has been linked in. So something like the following:

# create the dummy kernel
gen_dummy_kernel avs_kernel.out -o avs_kernel.obj

# Run make for the dsp demo in question 
# (compiles source and statically links in 
# the avs_kernel.obj dummy kernel)

# remove the dummy kernel
coff_unresolve -s .tinkernel demo_console.out

Unfortunately, the code produced using this technique doesn't run. It
results in the eventual error message:

open: Device or resource busy

This is the same message as is received if you actually forget to run
coff_unresolve on the demo_console.out dsp task.

What does work, however, is simply renaming the unlinked demo_console.obj
file and placing that in the /lib/dsp/modules/ directory.

Have other people seen this problem? Has anyone else tried? I'd specifically
like to work out whether it's me making a mistake with coff_unresolve (as
this step will certainly be necessary for dsp tasks which are built using
more than one source file, as these can't be linked together without the
dummy kernel (avs_kernel.obj)).



P.S. The above steps are documented in the dsp_dld_spec13.pdf file from
dspgateway, in Chapter 5., "Building a DSP dynamic task module".

More information about the maemo-developers mailing list