VxWorks

VxWorks from Wind River Systems is a RealTime operating system for embedded computers. The JamaicaVM is available for VxWorks 5.4 and the following target hardware:

Installation

The VxWorks-Version of Jamaica is installed like descripted in section "Installation". Additionally the following steps have to be done:

Configuration of VxWorks

VxWorks have to be configured to include the following functionallity:

  • INCLUDE_POSIX_ALL

Warning

Is some of these functionally is not included in the VxWorks kernel image, some linker errors may occur when loading an application built with Jamaica and the application may not run correctly.

Configuration for installed Tornado

  • Set the environment variable WIND_BASE to the base directory of the Tornado installation (default) or

  • extend the include path property include.vxworks-* in /usr/local/jamaica/etc/jamaica.conf with the include path of the vxWorks target header files,

  • Add the Tornado tools directory to the PATH environment variable, such that tools like ccppc.exe can be found.

We recomment to set the environment variable WIND_BASE in your boot- or login-script to the directory where Tornado is installed (top-level directory). Usually no modification of the Jamaica property file /usr/local/jamaica/etc/jamaica.conf is needed.

Warning

Do not use the DOS/Windows-Style path separator \ (backslash) in WIND_BASE, because in the Cygwin environment (bash) a backslash is interpreted as an escapce sequence for some special characters. Do only use / (slash) in path names.

Configuration of the C-cross-compiler

Jamaica use a C-cross-compiler to create binary excutables for VxWorks from the intermediate C-code. Unter Linux usually a C-cross-compiler is installed in /opt/cross. In the property file /usr/local/jamaica/etc/jamaica.conf a C-cross-compiler is configured for the appropiated target under this directory. If your C-cross-compiler is installed in another directory or with a different name please change the following properties:

  • Xcc.vxworks-*

  • Xld.vxworks-*

  • Xstrip.vxworks-*

Loading an application

An application created with the Jamaica Builder can be loaded on the VxWorks target like any other VxWorks program. If the target system is configured for disk, FTP or NFS access simply enter the following command on the target shell:

  ld < <Filename>
  

<Filename> is the complete filename of the created application.

Starting an application

The main entry point for an application build with the Jamaica Builder is the name specified by the Builder-optioon -destination or in case this option was not specified the name of class-file containing the main()-methode. In the VxWorks target shell the application can b e started e. g. with:

  sp HelloWorld,<argument string>
  

The name of the main entry point can be changed with the Builder-optioon -destination. The Builder generates a file with the specified name, but it is possible to rename it later, because the name of the main entry point is read from the symbol table included in the object file.

Optional parameters, like -classpath or -Xbootclasspath can be passed to the application as a single C argument string (text enclosed in "). Multiple arguments in the string can be separated by spaces. The start code of the created application parses this string and pass it as a standard Java string array to the main method.

Linking the application to the VxWorks kernel image

The built application can also be linked directly to the VxWorks kernel image, e. g. for saving the kernel and the application in a FLASH memory. In the VxWorks kernel a user application can be invoked enabling the VxWork configuration define INCLUDE_USER_APPL and defining the macro USER_APPL_INIT when compiling the kernel (see VxWorks documentation and the file usrConfig.c). The prototype to invoke the application created with the Builder is:

  int <main class name>(const char *commandLine);
  

where <main class name> is the name of the main class or the name specified via the Builder-option -destination. For linking the application with the VxWorks kernal image the macro USER_APPL_INIT should be set to something this name:

  extern int HelloWorld(const char *); HelloWorld(<args>)
  

where <args> is the command line as a C string which should be passed to the application.

Limitations

In the current release of Jamaica for the VxWorks OS the following limitations have to be taken into account:

Special hints