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.