summaryrefslogtreecommitdiff
path: root/README
blob: d40f7bf59be85be8645bd0dae1aa708ede1b7631 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Pre-requisites
==============

ARM toolchain
-------------

The ARM development toolchain is based on the CodeSourcery version of GCC. This
document is based on the hard floating point 2009q3 1.0.18-4 release from the
scratchbox project, available from

http://scratchbox.org/download/files/sbox-releases/hathor/tarball/scratchbox-toolchain-cs2009q3-eglibc2.10-armv7-hard-1.0.18-4-i386.tar.gz

Other versions should work as well.

Hard floating point is not a requirement but provides better floating point
performances. Mixing soft floating point and hard floating point applications
and libraries is *not* supported. Compiling the whole system with the same
compiler is thus highly advisable.

To install the toolchain, extract the tarball (this document assumes that the
tarball will be extracted to /opt, but any location can be used) and add the
compiler bin directory to the PATH environment variable. This can be automated
by adding

export PATH=/opt/scratchbox/compilers/cs2009q3-eglibc2.10-armv7-hard/bin:$PATH

to ~/.bashrc (when using the bash shell).

DSP toolchain
-------------

Compiling applications for the C64 DSP embedded in the OMAP3 processor requires
two development tools, both proprietary and available from Texas Instrument.

Those tools are made to be invoked from the command line, either directly,
through a script/makefile or from an integrated development environment (IDE).
TI provides an Eclipse-based IDE called Code Composer Studio (CCS). CCS is not
free of charge (although a 30-days evaluation version is available), so this
project will use the command line tools directly.

Switching to CCS at a later time will be possible if required, as CCS is based
on the same command line tools.

* Code Generation Tools

The TI Code Generation Tools (CGT) include a C/C++ compiler, an assembly
compiler and a linker. A version for the OMAP3 DSP is available from

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

This documentation is based on version 7.0.3. Later versions, especially minor
releases, should work as well.

Download the installer from the above URL and install the tools in
/opt/ti/cgt6x-7.0.3.

* doffbuild

The doffbuild tools are used to create a relocatable DSP dll64P object.
They can be found in the git repository located at

git://gitorious.org/ti-dspbridge/userspace.git

Clone the repository with

git clone git://gitorious.org/ti-dspbridge/userspace.git

and copy the DLLcreate utility to /opt/ti/doffbuild/bin/

mkdir -p /opt/ti/doffbuild/bin
cp source/dsp/bdsptools/packages/ti/dspbridge/dsp/doffbuild/bin/DLLcreate /opt/ti/doffbuild/bin/

* baseimage.dof

baseimage.dof is the TI DSP operating system (DSP/BIOS) image to be loaded in
the DSP. TI released several versions with no clear versioning scheme. While
DSP/BIOS itself is maintained, the location of the most recent baseimage.dof
version is unclear.

A working baseimage.dof version can be found in the TI DSP Binaries v3.09,
available at.

https://gforge.ti.com/gf/download/frsrelease/285/3260/DSPbinaries-3.09-Linux-x86-Install

After downloading and running the installer, copy the baseimage.dof file from
the Binaries directory to the /lib/dsp directory on the target system.

Kernel headers
--------------

Recent kernel headers (>= 2.6.39) are required to compile both the application
and its dependencies. The headers can be installed locally in the kernel tree
usr/ subdirectory by running

make headers_install

The remainder of this document assumes that kernel headers have been installed
in the kernel tree usr/ subdirectory.

Media Controller library
------------------------

The sample application requires the libmediactl and libv4l2subdev libraries.
They can be found in a git repository at

http://git.ideasonboard.org/?p=media-ctl.git;a=summary

To configure the library, run

./configure CC=arm-none-linux-gnueabi-gcc --host=arm-none-linux-gnueabi \
	--with-kernel-headers=/path/to/kernel/usr \
	--prefix=/path/to/libmediactl/installation

Compile and install the library and its headers with

make
make install


Compilation
===========

The DSP Makefile relies on environment variables to locate the TI Code
Generation Tools and doffbuild tools. The following two lines will set the
required environment variables and can be added to ~/.bashrc.

export DSP_CGT=/opt/ti/cgt6x-7.0.3
export DSP_DOFFBUILD=/opt/ti/doffbuild

To compile the DSP and ARM software, run

make KDIR=/path/to/kernel/usr \
	MEDIACTL_DIR=/path/to/libmediactl/installation \
	CROSS_COMPILE=arm-none-linux-gnueabi-

This will create two executables, dsp/threshold.dll64P for the DSP and
isp-dsp for the ARM.


Installation
============

Copy the threshold.dll64P DSP executable to the /lib/dsp/ directory on the
target system. The isp-dsp ARM executable can be run from any directory.