Contents

Prebuilt

Since it can be a pain to build the cross compiler on Windows, I'm providing a prebuilt toolchain. 32 bit Ubuntu 9.10 does some incorrect things during GCC's build that causes the built to fail. So I've provide that one too.

It's currently untested, but should work (whoever confirms it builds working binaries can remove this sentence.) I'd appreciate if someone was to mirror this on a fast server since my server that it's currently on isn't fast, and the only has a 3Mb connection (something like 350 Kb/s downloads.)

Windows (ready to be tested) Extract to C:\ (full path to bin is C:\winarm\didj\bin) It can also be tested in the root of any partition. It should also be tested with extracting it into a different location.

After that, the cross compiler should be built. You should now be able to build binaries for the Didj. I'd suggest adding /usr/local/didj/bin to your PATH. This is often in $HOME/.profile. Depending on your shell, Bash compatible shells can use:

export PATH=/usr/local/didj/bin:$PATH

Usage

The following all assumes the PATH has been correctly setup.

Simple usage

Typical usage for compiling and linking a single file:

arm-linux-uclibcgnueabi-gcc -o hello hello.c

Autotools

Typical usage for cross compiling a project that uses autotools

./configure --host=arm-linux-uclibcgnueabi
make

CMake

CMake cross compiler rules

Save this file as ~/didj/didj.cmake

# this one is important
SET(CMAKE_SYSTEM_NAME Linux)
#this one not so much
SET(CMAKE_SYSTEM_VERSION 1)
# specify the cross compiler
SET(CMAKE_C_COMPILER /usr/local/didj/bin/arm-linux-uclibcgnueabi-gcc)
SET(CMAKE_CXX_COMPILER /usr/local/didj/bin/arm-linux-uclibcgnueabi-g++)
# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /usr/local/didj /home/harley/didj/rootfs /home/harley/didj/custom/rootfs)
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Then use this command to build it. It's better to build in a clean subdirectory in CMake projects.