Camera Link PCI Express (PCIe) Gen1 Framegrabbers
Appendix D: VxWorks
EDT, Inc.
2012 March 16
36
Appendix D: VxWorks
To run EDT products on VxWorks, you’ll need to contact EDT for instructions customized for your setup.
Initialization
The program
edtInstall
initializes the driver. To initialize the board for your camera, run
camconfig
and
select your camera model.
Applications With and Without File Systems
EDT’s VxWorks software can be configured to run with or without a file system.
If your target system has a file system, all programs work as for other operating systems, as described in
the rest of this manual.
If your target system does not have a file system, build the required camera configuration files into the kernel
module at the time of compilation. To save images to disk, you must set up a remote (e.g., FTP) connection
to your development host. However, even with no file system, you can test whether image acquisition is
working by running:
camconfig
(if you have not yet initialized the board)
take "-l 10"
(to acquire 10 images and store them in main memory until the program exits).
Display Applications
Because VxWorks applications typically include hardware-dependent code, EDT’s GUI applications (such
as
pdvshow
) do not work with VxWorks out of the box. However, EDT provides source code for
pdvshow
and the FLTK/OpenGL version
pdv_flshow
for developing a GUI.
If you wish to write your own image acquisition application, start with the example on the first page of the
EDT digital imaging library in the EDT API (see
). If not, simply use
take
to
capture images and transfer the images to your PC for display.
Portability
If you want to develop a cross-platform application (for example, to develop and test a program on Windows
or Linux before deploying it on VxWorks), be aware that for VxWorks, the operating system, applications,
and libraries are linked together into one binary that is loaded into memory and run as a single process, so
applications cannot have a
main()
To address this, your application can check whether the
NO_MAIN
name is defined and, if it is, replace
MAIN
opt_create_argv()
to split the string into an argument array and count.
Example (from
xtest.c
):
#ifdef NO_MAIN
#include "opt_util.h"
int xtest(char *command_line)