Building a Phoenix capable vxworks simulator image for Windows

This document acts as a guide for building a vxworks simulator image in a phoenix runtime development environment that can subsequently be used by vxsim on Windows. As most (all?) of the phoenix runtime developers use Linux we're going to assume you will also build on Linux.

You will need:

  1. Access to a Linux machine for Git and building.
  2. A clone of the phoenix git repo
  3. A workbench-3.2 installation
  4. A vxworks-6.7 installation
  5. A clone of the tcf git repo

The remainder of this document will setup this environment and build a simpc vxworks image.

Let's home everything we need in the same directory:

mkdir phoenix
cd phoenix
export PHOENIX_DIR=$PWD

Clone the phoenix repository

git clone git://git.wrs.com/git/projects/phoenix/phoenix

Clone the TCF repository

git clone git://git.wrs.com/git/projects/tcf

Our phoenix changes for TCF are on a specific branch so we need to checkout out that particular branch.

(cd tcf; git checkout -b component_prototype origin/component_prototype)

We need a vxworks-6.7 (or 6.8) installation together with a Workbench-3.2 installation. It is important to note that a standard vxworks-6.7 installation on Linux won't give us the necessary SIMPC BSP components that are needed to build a windows vxsim image. There are two ways we can get the correct installation:

  1. Install vxworks/workbench using the silent installer from the DVD images.

  2. Use Peder's already installed images; these are checked into a Git repository in Alameda.

Option 1: Using the Silent Installer

You will need to use your local cdftp site and appropriate DVD image.

./setup_linux -silent -nosplash -installKeys $installKey -installPath $PHOENIX_DIR/wb3.2 -hosts all -archs all -consoleLog -status`

You should now skip to registering the phoenix and TCF source components.

Option 2: Using the installed images from Git

First clone workbench:

git clone ssh://git.wrs.com/git/users/panderse/wb3.2.git

Now choose your desired vxworks version:

git clone ssh://git.wrs.com/git/users/panderse/vx67.git
git clone ssh://git.wrs.com/git/users/panderse/vx68.git

Note: if you are in Swindon you can use these links - they are clones of Peder's repositories and will save you considerable download time as the two repositories that you need exceed 750MB.

Once the clones of vxworks and workbench are complete you'll need to register the vxworks-6.7 tree in the workbench installation:

cd vx67
./do_install.sh ../wb3.2

Note: the output from the do_install script indicates some errors; these are harmless and are expected.

rm: cannot remove `vxworks-6.7': No such file or directory
rm: cannot remove `diab/5.7.0.0': No such file or directory
rm: cannot remove `gnu/4.1.2-vxworks-6.7': No such file or directory
rm: cannot remove `components': No such file or directory
Performing final steps to finish installation.
Creating install properties file.
Registering Eclipse extension locations
Installation finished.

Installing the Phoenix and TCF components

Now that we have a combined Workbench and VxWorks installation we need to install the phoenix and TCF sources as components in that installation. To ensure that they get installed in the correct place we first setup a shell with the correct workbench environment.

cd $PHOENIX_DIR/wb3.2
./wrenv.linux -p vxworks-6.7

Now register the phoenix and TCF components:

cd $PHOENIX_DIR/phoenix/platforms/vxworks/release
./do_install.sh $WIND_HOME
cd $PHOENIX_DIR/tcf/agent
./do_install.sh $WIND_HOME
exit

Building the vxworks image

cd $PHOENIX_DIR/wb3.2
./wrenv.linux -p vxworks-6.7
cd $PHOENIX_DIR/phoenix/platforms/vxworks/projects
mkdir -p $PHOENIX_DIR/wb3.2/vxworks-6.7/target/proj
make simpc.build

Once the build completes you can find the vxWorks image in the simpc_prj directory. Simply copy the vxWorks image and its symbol table (vxWorks.sym) to your windows machine and invoke vxsim.

Lather, Rinse, Repeat

You will want to stay abreast of runtime changes so a typical ``fetch the latest changes and build a new simulator'' sequence will look like:

cd $PHOENIX_DIR/wb3.2
./wrenv.linux -p vxworks-6.7
(cd $PHOENIX_DIR/phoenix; git pull)
(cd $PHOENIX_DIR/tcf; git pull)
cd $PHOENIX_DIR/phoenix/platforms/vxworks/projects
make simpc.rebuild

Note: this is different to the first build as we build use a different make target (simpc.rebuild). The .rebuild will only rebuild the phoenix sources and will be a lot quicker than the initial build.