W&T connects
Interfaces for TCP/IP, Ethernet, RS-232, RS-485, USB, 20mA, glass and plastic fiber optic cable, http, SNMP, OPC, Modbus TCP, I/O digital, I/O analog, ISA, PCI

Application:

Install the cross-compiler on a Linux system


Here is how to install the cross-compiler on a Linux system for translating C/C++ source texts into executable program files for the target system of the Motherbox and pure.box:

To be able to create C/C++ programs for the Motherbox and the pure.box you need a cross-compiler which translates a source text into a machine code executable by the target system. This cross-compiler can be installed on a Linux guest system in just a few steps.

The cross-compiler can in the simplest case be invoked using the command line of the guest system to create binaries for the Motherbox and the pure.box. It is also possible to easily integrate into more complex development environments such as Eclipse.

The following example shows step-by-step how the cross-compiler is installed. The guest system used here is a current Ubuntu (64-bit). In general this procedure can be used on any 64-bit Linux system.

  • Download the W&T Toolchain.
    (as of: December 13, 2019)
  • Open a terminal using normal user rights and go to the directory containing the downloaded tool chain. Make it executable using the command shown at right.
    chmod +x e-50511-01-swww-009.sh
  • Start the toolchain installation and follow the instructions in the terminal. (Command is at right(

    NOTE: The root password is required for this procedure!
    ./e-50511-01-swww-009.sh
  • To compile a simple program using the program line, the adjacent command is required.

    arm-linux-gcc opens the compiler which the machine code creates.

    The option -I tells the compiler where to find the Include files needed for the pure.box.

    -o defines the program file you are creating.

    The file path (here: main.c) references the source text to be translated.

    Finally, information about the target system is also required. Here there are differences between the pure.box 3 / Motherbox 3 and the pure.box 5.

    pure.box 3 and Motherbox 3:
    arm-linux-gcc -I /usr/local/arm-pkg.armv5te/usr/include/ -o hello_world main.c -mcpu=xscale

    pure.box 5:
    arm-linux-gcc -I /usr/local/arm-pkg.armv7hl/usr/include/ -o hello_world main.c -mtune=marvell-pj4 -march=armv7-a -mfloat-abi=softfp