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.

1. Get TI Linux DSP tools from:

https://www-a.ti.com/downloads/sds_support/targetcontent/LinuxDspTools/index.html

Access to the download requires creating an account.

The download page has a link to a "Getting Started" PDF which has
instructions for installing. The install instruct start at page 11,
chapter 2.3.1. The download package is an ELF-executable but
fortunately it just unpacks the main package. The package seems to
require java - at least it prints out "Searching for Java(tm) Virtual
Machine". For other pre-requirements see chapter 2.1, but note that
not all of the listed things are strictly required. Installing pdksh
might be a good idea if one does not want to go changing the scripts
written for ksh.

For easily installing the unpacked subpackages one can use the
supplied expect script. Naturally this requires having expect
installed. Alternatively one can simply unpack the tarballs one by
one. It is probably a good idea to use the same directory names as the
ones used in the instructions in order to minimize needed chages to
DSP gateway makefiles.

The instructions starting from chapter 3 seem to be MontaVista and
dsplink specific. If one wants to use the dsp gateway there's no need
to follow those.

2. Get dsp gateway from http://dspgateway.sourceforge.net/pub/index.php

Get both the arm side package (dspgw-3.3-arm.tar.bz2) and the dsp side
package (dspgw-3.3-dsp.tar.bz2). No need to go patching the 770 kernel
or rebuilding it. Unpack the tarballs. Go to
dspgw-3.3-arm/host_utils/mod_utils and build the coff_unresolve and
gen_dummy_kernel tools. Simple make should be sufficient. Either copy
these tools to your path or adjust
dspgw-3.3-dsp/apps/demo_mod/Makefile to use the tools from the
directory where they are. Also build the arm side of the demo console
in dspgw-3.3-arm/apps/demo with "make demo_console". You may need to
adjust CC to point to your arm cross compiler, e.g.
/scratchbox/compilers/arm-gcc-3.3.4-glibc-2.3.2/bin/arm-linux-gcc if
you have scratchbox installed.

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.

4. Install demo_console

In order to make the DSP gateway dynamic loader to load the DSP side
of the demo, we need to add a line to the /etc/dsp/dsp_dld_avs.conf
file. So e.g.

# cp -i /media/mmc1/demo_console.o /etc/dsp/modules
# echo "demo_console _task_demo_console 1 /etc/dsp/modules/demo_console.o" \
  >> /etc/dsp/dsp_dld_avs.conf

I was not able to restart the DSP gateway dynamic loader (there is an
init script for dld) so I just rebooted my 770. After boot there
should be a /dev/dsptask/demo_console if the dld managed to load the
module.

Now just run the arm side demo_console. You should see some praise :-)

-- 
http://www.iki.fi/~ananaza/

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to