Table of contents |
RTLinux is a real-time extension to the Linux operating system created by FSMLabs, Inc. It provides hard real-time performance by implementing a micro-kernel which runs all of Linux as a subordinate thread. Users develop software which can run in that microkernel and thus run at a higher priority than Linux itself. DSCUD for RTLinux provides the full DSCUD API for software running inside that RTLinux microkernel.
The DSCUD API is only available in RTLinux kernel space, so if you must access the DAQ from user space you will have to implement your own methods for communication between RTLinux kernel space and Linux user space such as a real-time FIFO or shared memory. See the examples provided with the RTLinux kit or the RTLinux user manul for more information on this.
RTLinuxPro version 2.1 and 2.2 is supported. Support for other versions of RTLinuxPro 2.x may be available on request. Contact support@diamondsystems.com in inquire. Only the commercial version of RTLinux is supported. RTLinux/GPL and RTLinuxFree are not supported at this time.
The driver is available as a simple tar gzip'd archive. To install the driver in this format you just extract the archive and move the new driver folder to the correct location on your system. Here is an example.
$ tar zfx dscud-5.9.tar.gz $ mv dscud5 /usr/local/
The driver consists of a header file dscud.h which you include in your C program, and an RTLinux module dscud5.rtl which you run on your RTLinux system to provide the DSCUD API within RTLinux. Also included are example programs and a Linux kernel config file useful for recompiling the FSMLabs provided kernel for running on Diamond Systems CPU boards.
You compile RTLinux software for DSCUD using the build system provided by FSMLabs. They provide many example Makefiles which show how to compile software for their system. However, you must update the CFLAGS Makefile variable to point to the correct path to the dscud.h header file.
For RTLinuxPro 2.x you add the following near the top of your Makefile. This must come after your Makefile includes the rtl.mk build rules file provided with RTLinux. In this example you must change the MODULE variable to the name of your RTLinux module.
MODULE=myprogram CFLAGS_$(MODULE).o := -I/usr/local/dscud5 CFLAGS_$(MODULE).rtl := -I/usr/local/dscud5
Due to the nature of RTLinux and its dependence on the pthreads API, the standard DSCUD demo programs provided on the Diamond Systems website will not compile on RTLinux as is. Instead you should use the example programs provided with the driver itself. These examples include Makefiles and can be used to start your own programs based on DSCUD.
However, the DSCUD Demos on our website are still very useful as example code for how to use the DSCUD API and can be converted to run on RTLinux by removing the user keyboard interaction and running the code in a RTLinux thread.
To install DSCUD for RTLinux on your target system you should copy the dscud5.rtl module to your embedded system. This module should be run after the RTLinux environment is initialized or you will see "unresolved symbol" errors as DSCUD is unable to access the RTLinux API. The dscud5.rtl module must remain running to provide the DSCUD API within RTLinux.
These notes apply only to the RTLinux version of DSCUD.
This page was last modified 22:17, 2 Aug 2005.
Copyright (c) 2004 Diamond Systems. All Rights Reserved.