Experimental Physics and
Tornado 2.2 and Linux
This page explains how to use Linux to cross-compile EPICS applications to run on the vxWorks version 5.5.x RTOS. If you discover any additional information that ought to appear here, please contact me.
Linux as Host
Wind River don't support hosting the Tornado 2 environment on Linux, but it is possible to build their GNU compiler tools for Linux on x86 (x86_64 also works providing you have the 32-bit compatibility libraries installed). This page provides cross-compilers for the PowerPC (ppc40x/60x/860, not e500) and MC680x0 families of processors that should run on Red Hat Enterprise Linux versions 5.6 or later.
The code generated by these compilers has been found to be identical to that generated by the equivalent compilers shipped by Wind River for Solaris hosts.
The compressed tarfiles below should be extracted into your Tornado 2.2.x installation directory (i.e. WIND_BASE). They only contain files under the directory host/x86-linux which does not exist in a normal Tornado 2.2.x install tree. The EPICS build system will look in this location for the compilers and other tools it needs to use.
Building from Source
The sources used to build the binary files above are provided below, and were obtained from Wind River in January 2012. To obtain a newer version of the compiler you can ask Wind River or your vxWorks supplier for a copy of their latest GCC source code for Tornado 2.2.x — as a vxWorks licensee you are entitled to this source code since GCC is licensed under the terms of the GNU GPL and you have bought a binary copy of these tools. If you use a newer version of the GCC sources you might have to modify the associated build script to get it to work properly.
To use one of my build scripts below, download it into the same directory as the source tarfile and edit it to change the SCRATCH and TORNADO settings and if necessary the SOURCE and PRODUCT filenames. The SCRATCH location is used to extract the source files from the file given in SOURCE, and for building the compiler. TORNADO must point to your existing installation of Tornado 2.2.x which is used to obtain the header files for the vxWorks target. The generated compiler tools will be archived into a tarfile named PRODUCT. After the build completes (assuming it is successful) the SCRATCH location is no longer required and can be deleted.
Note that these compilers are based on old versions of GCC; they pre-date the advent of the 64-bit Intel/AMD processors and as given cannot be compiled for the x86_64 architecture (if you create the necessary configuration files to do that please send them to me). They also use C constructs that are not supported by some more recent versions of GCC, thus the above build scripts use gcc34 (i.e. GCC version 3.4.x) to compile the compiler, and have to turn off some optimizations to work properly.
Some even older vxWorks compiler sources can be obtained from SNS, but the above build scripts may not work unmodified with these versions. This tech-talk thread discussed earlier versions of these sources although the URLs quoted there have been replaced by the SNS link in this paragraph.
EPICS binaries are not bootable vxWorks images. This page only covers how to obtain or build the GNU tools and C/C++ compilers to produce object files and executables that can be loaded using the vxWorks host or target shells.
To build fully-bootable vxWorks images you may need some additional programs that are provided by Wind River for their supported host architectures and are not licensed using the GNU GPL. Some of those tools are scripts that can be run or adapted to run on Linux, but this is not possible for the binary executables.
I have successfully built bootable vxWorks images on Linux, but I configure my builds using the target/config/all/configAll.h file and build them from the command-line using make. Other vxWorks customers who use the Tornado Project facility have told me that project-based builds are not easy to do and may actually be impossible.
|ANJ, 01 Jun 2012||
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·