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.
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.
gnu-tools.tor2_2-ppc-rhel5.tgz (9.7M) Cross-compiler and tools for PowerPC family CPUs.
Output from ccppc -v:
gcc version gcc-2.96 (2.96+ MW/LM) 19990621 AltiVec VxWorks 5.5
30526 65115 79101 80797 83322 83686 84218 85823 85874 85973 86999 87279 87638 87983 88306 88708 88966 89304 89539 90058 90104 90120 90270 90296 90648 90662 90779 90928 91237 91632 92024 92072 92555 92917 93065 93471 93709 93891 94164 94188 94505 94639 95014 96060 96130 96886 97572 98140 98595 98717 99246 99271 99340 101118 101132 101530 101810 102460 102989 104204 104359 105970 106099 106462 106968 107675 107935 108030 108510 108992 108993 108995 108997 109801 109813 110402 110510 110527 110534 110843 112382 113333 114013 114931 115074 115306 115482 115908 115962 116425 117328 117558 117933 119507 120192 120668 cq52614 cq59917 cq64767 cq69164 cq70080 cq70266 cq70375 cq71476 cq82172 cq85289 cq87444 cq96321 cq96656 cq111894 cq116734 cq117781 cq117905 cq120110 cq120176 cq121702 cq126361 cq127426 cq128717 cq129941 cq131012 cq131270 cq152786 cq165227 cq192740 cq208150 cq207235 cq226819 cq235846 cq236500 cq294696
gnu-tools.tor2_2-m68k-rhel5.tgz (7.4M) Cross-compiler and tools for MC680x0 family CPUs.
Output from cc68k -v:
gcc version gcc-2.96 (2.96+CP1 MW/LM) 19990621 VxWorks 5.5
30526 63496 65115 80651 83322 83686 84218 85859 85973 86650 86652 88708 88966 89304 89539 90104 90270 90296 90298 90648 90739 90779 90891 90928 92024 92072 92903 92917 92945 93065 93471 94164 94505 95075 96886 97572 98140 98595 98717 99271 101118 101132 101810 102493 104204 104359 104575 106572 106573 108411 109801 110363 110510 113333 115074 115482 115962 117328 117558 117933 118504 119507 120584 cq59917 cq70266 cq70375 cq71476 cq82172 cq87444 cq96656 cq111894 cq117781 cq117905 cq121697 cq121702 cq128717 cq129941 cq131012 cq131270 cq152786 cq186737 cq192740 cq203664 cq226819
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.