VxWorks is a real-time embedded operating system from WindRiver. It is one of the original general purpose embedded operating systems and offers excellent deterministic real-time performance. The Tornado development environment provided by WindRiver for development VxWorks applications includes development tools and system analysis tools with many useful features not found in any other embedded toolset.
DSCUD for VxWorks is implemented as a static C library which customers link with their own programs before downloading the completed application to the target system.
VxWorks 5.5 and Tornado 2.2 for Windows were used for development and testing of this driver. Support for other versions of VxWorks and Tornado may be available on request. Contact support@diamondsystems.com to inquire.
The driver is available as a zip file. To install the driver in this format you just unzip it to the directory of your choice using a program such as WinZip. If you want to use the Diamond Systems DAQ demo programs which include Tornado project files for easy compilation, install the driver at C:\DSCUD\ since this is the include path used in these project files. The instructions below assume that C:\DSCUD\ is the location of the driver files.
The driver consists of a header file dscud.h which you include in your C program, and a Tornado compiled static C library libdscud5.a which you link with your program. See the instructions below for more information on these steps.
These instructions go step by step through the process of creating your own VxWorks application which links with DSCUD for VxWorks using Tornado 2.2 for Windows.
- Launch the Tornado tools on your development PC.
- In the File menu select New Project.
- In the window that appears, select the New tab and then double click Create downloadable application modules for VxWorks. This will launch a wizard for creating your application.
- On the first stage of the wizard, chose whatever settings you'd like for the Name, Location, and Workspace. Click Next.
- On the second stage of the wizard, choose a project or toolchain for compiling your application and click Next.
- The last stage lets you review your settings. Click Finish to create your project.
- The Workspace window appears after you create your project. Click the Files tab at the bottom of this window. Right click in the Workspace window and select Add Files. Select the .c and .h files that compose your program.
- You must be sure that your program includes the DSCUD header file for example with this command. #include <dscud.h>.
- In the Workspace window click the Builds tab at the bottom of the window. Click the + to open the tree which shows your toolchain which you will configure, for example Pentium3gnu. Select properties.
- The Build Specification Properties window will appear. Click the Macros tab. Pull down the menu to select the PROJ_LIBS option. Type C:\DSCUD\libdscud5.a. Click Add/Set.
- Click the C/C++ compiler tab. Click the "Include paths button. In the new window that appears push the Add button. In the new window that appears type C:\DSCUD\. Click OK and then OK to close these two windows.
- Click Apply and then OK to save your changes and exit the Build Specification Properties window.
Your application is now ready to be built. See the VxWorks Tornado documentation for additional help with this development environment.
These notes apply only to the VxWorks version of DSCUD.
- The driver is not thread safe. If you have multiple threads or programs interacting with the same board at the same time using DSCUD you must implement your own synchronization methods.
- User interrupt functions are called directly from the interrupt service routine. This is a restrictive environment. See the VxWorks documentation for more information on features which are not available in an interrupt context.
- Interrupt sharing support is not implemented in DSCUD for VxWorks. Each DAQ board must be assigned a unique IRQ for interrupt driven DAQ operations. Support for this feature may appear in future versions of the software.