VxWorks Support
Building the Sample Program
CEI-100/CEI-200/CEI-
x20 User’s Manual
157
After you have built and downloaded the API, carry out a basic board test
by downloading and running the provided sample program. This is
described in the next section, “Building the Sample Program”.
Building the Sample Program
The API distribution includes a sample program named vxw_wrap.c. You
can use this program to test your installation. The program simply executes
an internal wrap test on all receiver-transmitter channel pairs. You can also
use vxw_wrap.c as a guide for programming with the CEI-x20 API.
Like the API, the sample program is also built as a downloadable
application. The following steps explain how to build and run the sample
program.
1.
Create a new downloadable application project.
2.
Add the file vxw_wrap.c from the folder ‘[
CEI-x20 Install Path
] \
Examples \ C \ VxWorks’ to the project.
3.
Open the C/C++ compiler parameter setup window. Remove the
-ansi
compiler option. Using the –I compiler option, add the include
directory ‘[
CEI-x20 Install Path
] \ Include’. Add the ‘–mlongcall’
compiler option (PPC targets only). Using the –D compiler option,
define the constant CEIX20_TARGET_VXWORKS.
4.
Build the project and download it to the target system.
5.
Open a shell to the target and invoke the function
wrap(<board id>),
where
<board id>
represents the desired board index. The board
index is always zero unless multiple Abaco Avionics cards are
installed. If multiple cards are installed, use the
abacoBoardShow
command to determine which board index corresponds to the desired
board. The
abacoBoardShow
command is only available for PCI,
cPCI, and PMC cards.
If everything is working correctly, the output of the sample application
should resemble the trace shown Figure 32.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com