Cross compile for ARM, TS-7500 board

The TS-7500 single board computer from Technologic Systems is one of a family of boards based on the  Cavium ARM processor. The board runs a standard Debian Linux system from an SD card, useful for development, and alternatively a uClibc/Busybox system from flash for the  production phase (boots in less than 3 sec). Programs for the Debian system can be compiled on board, but that is a somewhat slow experience. So except for small test programs one will want to cross compile using a Linux work station.

Cross compilers can be downloaded from the ts7500 ftp site, There is one which links with uClibc and several that link with glibc. The former will run under both the Debian and uClibc system, the latter only under the Debian installation. Download and extract compilers, I extracted them under /usr/local/ts7500, providing two directory trees: arm-uclibc-3.4.6  and arm-unknown-linux-gnu

To compile for the uClibc system, use these compiler and linker flags (taken form the sample code‘s Makefile:

LDFLAGS=-Wl,--rpath,/slib -Wl,-dynamic-linker,/slib/
CFLAGS=-march=armv4 -Os

To test the tool chain, download the sample code tree and edit the Makefile tool chain path to reflect your compiler installation. Run make ts7500ctl and copy the ts7500ctl file over to the board. The program should be executable (./ts7500ctl –help) and ldd ts7500ctl should only point to the /slib library directory => /slib/ (0x4000d000) => /slib/ (0x4001e000) => /slib/ (0x40000000)

The uClibc library has evolved to a state where it may be linked to most programs. If you want to compile Debian source you may however use the glibc cross compilers. In this case you don’t need the linker flags and may compile like this:

/usr/local/ts7500/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-gcc \
            ts7500ctl.c ispvm.c -ots7500ctlglib

We now get these library references

ldd ./ts7500ctlglib => /lib/ (0x40026000)
        /lib/ (0x40000000)

0 Responses to “Cross compile for ARM, TS-7500 board”

  • No Comments

Leave a Reply