Project-Id-Version: Trac 0.12
Report-Msgid-Bugs-To: trac-dev@googlegroups.com
POT-Creation-Date: 2008-01-30 09:20+0100
PO-Revision-Date: 2010-07-19 23:05+0200
Last-Translator: Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
Language-Team: en_US <trac-dev@googlegroups.com>
Plural-Forms: nplurals=2; plural=(n != 1)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Generated-By: Babel 0.9.6

wiki:Beagleboard_DSP/Building
Last modified 4 years ago Last modified on 10/22/10 20:54:15

Building and installing the DSP toolchain

This takes in two steps, with optionally a third. For all invocations of configure you should replace "$WHEREVER" with the target directory you wish the software to be installed in. I recommend "/usr/tic64x".

RPMs

Rob has built some Fedora 13 RPMs for the toolchain. You can install them straight using RPM, or you can add them as a yum repository by grabbing the 'tic64x.repo' file and putting it in the right place:

cd /etc/yum.repos.d
sudo wget https://www.studentrobotics.org/~rspanton/rpm/tic64x/tic64x.repo
sudo yum install tic64x-{binutils,clang,llvm}

Building binutils

Execute the following commands:

% git clone git://git.srobo.org/tic6x-binutils.git
% mkdir binutils-build
% cd binutils-build
% ../tic6x-binutils/configure --target tic64x --program-prefix tic64x- --prefix $WHEREVER
% make
% make install

Building LLVM and Clang

Perform the following commands:

% git clone git://git.srobo.org/llvm-tic6x.git
% git clone git://git.srobo.org/clang-tic6x.git llvm-tic6x/tools/clang
% mkdir llvm-build
% cd llvm-build
% ../llvm-tic6x/configure --prefix $WHEREVER
% make
% make install

You may wish to add "--enable-optimized" as an argument to configure, which doesn't compile a ton of debug information into binaries.

Note that if you already have llvm or clang installed you may run into trouble, as the tic64x versions have a lot of overlap with vanilla llvm/clang. I recommend configuring with option "--program-prefix=tic64x-". Alternately, uninstall the version of llvm/clang you have and install the tic64x version instead - they both do the same thing, just this one supports tic64x.

Building Newlib

First read the wiki page on the DSP environment before you decide you need libc/libm. Build and install binutils and LLVM/Clang, then:

% git clone git://git.srobo.org/newlib-tic6x.git
% mkdir newlib-build
% cd newlib-build
% ../newlib-tic6x/configure --host=tic64x --with-newlib CC="clang -ccc-host-triple tms320c64x-unknown-unknown" CC_FOR_TARGET="clang -ccc-host-triple tms320c64x-unknown-unknown" PONIES=true CC_FOR_BUILD="clang -ccc-host-triple tms320c64x-unknown-unknown" AR=tic64x-ar AS=tic64x-as
% make

This might fail when it reaches building documentation (I should probably disable that;), once there find libc in newlib-build/tic64x/newlib/libc/libc.a, and run "tic64x-ranlib" on it before using.

After reviewing this, it turns out you also have to hack clang to not trip over the "-B" option newlib uses: IE, to discard it rather than produce an "Unimplemented" error. To avoid horror, I've prebuilt libc/libm and put them in the dsp-code repo.