VxWorks integration

 
 


Revision 1.2, 9th July 2007

 

Introduction

Integration

 

 

Contact

 

VxWorks from Wind River is a real-time operating system.

 

For this environment, UPDD is supplied as a number of separate components. Software sent via email will be held in the ZIP file TBUPDDVxWorks.ZIP. Touch-Base utilises virus detection software on all of our systems but recipients of the software should pass the files through their own virus checking software before proceeding with installation.

 

Under UPDD version 3 we developed a serial driver for this operating system and under UPDD version 4 we have added USB support.  Currently the USB only supports the EELY controller but with relatively minor changes we can add support for additional USB controllers.

 

Within this environment, VxWorks is the embedded OS image created within the Tornado Integrated Development Environment (IDE). The image can be build for a number of platforms.  There is also WindML, otherwise known as UGL, which is the main graphics library on VxWorks and all other technologies seem to be built upon it. These include Zinc (a C++ wrapper for UGL) and the embedded Java runtime.

 

A good reference site for VxWorks and Tornado is http://www.xs4all.nl/~borkhuis/vxworks/vxworks.html.

 

The prerequisites for running the driver are that WindML and C++ support are built into the VxWorks image.

Integration procedure

UPDD version 4.x

 

This software was tested on

 

Tornado 2.2.x

VxWorks 5.5.1

WindML 3.0

 

This may not be the latest version. We would hope it will work with the latest version or that there would be minimum development work involved to make the driver work once the new development environment, using the latest VxWorks tools, has been setup.  This will need to be supplied to us as we do not as a matter of course update our VxWorks development environment.

USB

Installing the USB interface module

1.      Close running Tornado sessions

2.      Copy usrUsbUPDDInit.c to <Tornado>\target\config\comps\src

3.      Copy usbUPDDLib.c to <Tornado>\target\src\drv\usb

4.      Copy usbUPDDLib.h to <Tornado>\target\h\drv\usb

5.      Edit <Tornado>\target\src\drv\usb\Makefile and add “usbUPDDLib.c” to the “DOC_FILES” section

6.      Edit <Tornado>\target\src\drv\usb\Makefile and add “usbUPDDLib.o” to the “OBJS” section

7.      Copy 10usb.cdf <Tornado>\target\config\comps\vxWorks, overwriting the existing version

8.      Rebuild the BSP

Project integration

1.      Open your project in Tornado

2.      In the “Workspace” windows, select the VxWorks tab and open “hardware\peripherals\USB Devices” in the tree

3.      Right click “UPDD” in the tree and select “Include UPDD” from the menu

4.      In the “Workspace” windows, select the VxWorks tab and open “hardware\peripherals\USB Devices\USB Devices Init” in the tree

5.      Right click “UPDD Init” in the tree and select “Include UPDD Init” from the menu

6.      Add all of the “.o” files to your project

7.      Rebuild your vxWorks image file

Enabling UPDD in WindML

1.      Create the directory <Tornado>\target\src\ugl\driver\pointer\updd

2.      Copy the files “depend.PENTIUM3gnu”, “uglupdd.c”, “depend.PENTIUMgnu”, “Makefile” to this directory

3.      Copy the file “uglupdd.h” to the directory <Tornado>\target\h\ugl\driver\pointer

4.      Edit the file <Tornado>\host\resource\windML\config\database\windML_INPUT_DB.cfg and add “updd” to the “POINTER=” line

5.      Add the following section to the bottom of <Tornado>\host\resource\windML\config\database\windML_INPUT_DB.cfg

 

# UPDD

 

updd.NAME=UPDD Touchscreen

updd.ARCH=pentium3

updd.SELECT=INCLUDE_UPDD

updd.DEVNAME=/ata0a/tbupddvx/comReadPipe

updd.HEADER=ugl/driver/pointer/uglupdd.h

updd.DIR=updd

 

6.      Run the WindML configuration program from Tornado

7.      Click the “Devices” tab

8.      Click the drop down box for the “pointer” and select “UPDD Touchscreen

9.      Save the configuration and exit

10.  Build WindML

Invoking the driver and calibration procedure

 

1.      Ensure that the following directories exist on the system: “/ata0a/tbupddvx”, “/ata0a/tmp”

2.      Copy the file “tbupdd.reg” to the “/ata0a/tbupddvx” directory

 

The driver daemon must be running for UPDD to function correctly. To launch it, call the following function:-

 

taskSpawn "tbupddvx",100,0,48000,tbupddvx

 

You must calibrate the touchscreen before you use it. To do this call the following function:-

 

taskSpawn "tbcalibvx",100,0,48000,tbcalibvx

 

Notes

 

VxWorks keeps track of "file descriptors" used (files, sockets, pipes...) by means of a fixed size list that has a default size of 50 entries. Most systems will use a number of these ‘file descriptors’ and the number changes dynamically when operations are performed. It is important to have always some of these descriptors free because otherwise system errors will occur.

 

The UPDD driver requires approximately 25 file descriptors (mainly pipes) in order to work. One customer did not configure sufficient “file descriptors” and reported problems with USB devices dynamic attachment.

 

In this particular system the problem was solved by increasing the number of "file descriptors" (NUM_FILES = 100).

Serial

This version has not been tested with serial controllers but still has the serial code from UPDD version 3 which, in theory should work. For future serial requirements we would suggest testing this release and addressing any issues that arise.

Project integration

1.      Open your project in Tornado

2.      Add all of the “.o” files to your project

3.      Rebuild your vxWorks image file

Enabling UPDD in WindML

1.      Create the directory <Tornado>\target\src\ugl\driver\pointer\updd

2.      Copy the files “depend.PENTIUM3gnu”, “uglupdd.c”, “depend.PENTIUMgnu”, “Makefile” to this directory

3.      Copy the file “uglupdd.h” to the directory <Tornado>\target\h\ugl\driver\pointer

4.      Edit the file <Tornado>\host\resource\windML\config\database\windML_INPUT_DB.cfg and add “updd” to the “POINTER=” line

5.      Add the following section to the bottom of <Tornado>\host\resource\windML\config\database\windML_INPUT_DB.cfg

 

# UPDD

 

updd.NAME=UPDD Touchscreen

updd.ARCH=pentium3

updd.SELECT=INCLUDE_UPDD

updd.DEVNAME=/ata0a/tbupddvx/comReadPipe

updd.HEADER=ugl/driver/pointer/uglupdd.h

updd.DIR=updd

 

6.    Run the WindML configuration program from Tornado

7.    Click the “Devices” tab

8.    Click the drop down box for the “pointer” and select “UPDD Touchscreen

9.    Save the configuration and exit

10.  Build WindML

Invoking the driver and calibration procedure

 

1.      Ensure that the following directories exist on the system: “/ata0a/tbupddvx”, “/ata0a/tmp”

2.      Copy the file “tbupdd.reg” to the “/ata0a/tbupddvx” directory

 

The driver daemon must be running for UPDD to function correctly. To launch it, call the following function:-

 

taskSpawn "tbupddvx",100,0,48000,tbupddvx

 

You must calibrate the touchscreen before you use it. To do this call the following function:-

 

taskSpawn "tbcalibvx",100,0,48000,tbcalibvx

 

UPDD version 3.x

 

This software was tested on

 

Tornado 2.0.2

VxWorks 5.4.2

WindML 2.0

 

The version only supports serial controllers.  For future serial requirements we would suggest testing UPDD VxWorks version 4 and addressing any issues that arise.

 

VxWords integration instructions

 

-Copy uglupdd.c to <tornado>\target\src\ugl\driver\pointer

-Copy uglupdd.h to <tornado>\target\h\ugl\driver\pointer

-Open <tornado>\target\h\ugl\config\uglDepend.h

-At line 201 insert the following:-

 

/* UPDD Touchscreen */

#ifdef INCLUDE_UPDD

#include <ugl/driver/pointer/uglupdd.h>

#endif /* INCLUDE_UPDD */

 

-Open <tornado>\host\resource\ugl\uglDB.cfg

-At line 63 insert the following:-

 

# UPDD

 

DEVICE   UPDD Touchscreen

ARCH     PENTIUM

SELECT   INCLUDE_UPDD

DEVNAME  "/tbupddvx/comReadPipe"

HEADER   uglupdd.h

BSPHDR

 

-Open <tornado>\target\src\ugl\config\uglInit.h

-At line 249 insert the following:-

 

#undef  INCLUDE_UPDD              /* Updd touchscreen */

 

-Open <tornado>\target\src\ugl\driver\pointer\uglupdd.c

-At lines 18 and 19 modify the definitions of SCREEN_WIDTH and SCREEN_HEIGHT to match the video resolution you are using.

-In Tornado, select Tools, WindML

-Configure WindML for your hardware, selecting "UPDD Touchscreen" as your pointer device.

-Clean, Build and download WindML to your target machine

-Download "tbupddvx.out" to your target machine

-Download "tbcalibvx.out" to your target machine

 

VxWorks Runtime Instructions

 

-Create a directory "/tbupddvx"

-Copy "tbupdd.reg" to "/tbupddvx"

-Run "tbupddvx" with a stack size of at least 48000 bytes. e.g. to load it from the Tornado shell type:- "taskSpawn "tbupddvx",100,0,48000,tbupddvx" See below*****

-Run "tbcalibvx" to calibrate the driver for the first time. e.g. to load it from the Tornado shell type:- "sp tbcalibvx"

 

VxWorks Instructions to load and run "tbupddvx.out"

 

-Open Tornado

-If you do not have a target server running then do the following:-

-Click Tools, Target Server, Configure

-Select the server you want to use (we assume you will only see one)

-Click Launch

-In the dropdown box on the LAUNCH toolbar, select the target server you are using (again we assume you will only see one)

-Click Project, Download

-Select "tbupddvx.out"

-Click Tools, Shell

-Select your target machine in the drop down box, and click

OK to launch the Tornado shell

-In the Tornado shell type: taskSpawn "tbupddvx",100,0,48000,tbupddvx

 

At this stage the driver is running, and you should load your GUI program.

 

Contact

For further information or technical assistance please email the technical support team at technical@touch-base.com