|
Demand Peripherals
Robotic and Industrial Controls for Linux |
|
BaseBoard Prototyping Pin Peripherals BaseBoard IO Dual DC Motor H-Bridge Controller Dual H-Bridge Controller Bipolar Stepper Controller Unipolar Stepper Controller Quad Servo Controller Octal Servo Controller Dual Quadrature Decoder Maxbotix Range Sensor Ping))) Range Sensor IR Receiver IR Transmitter RC Receiver Quad PWM Input Quad PWM Output Octal PWM Output Quad Counter Quad Bidirectional IO Octal Bidirectional IO Watchdog Timer Tone Generator Quad Pattern Generator Octal Pattern Generator |
This guide shows how to install and use Pin Peripherals in a Linux system. It shows how to build and install the kernel components for the drivers, how to build and run the user-space device driver daemon, and how to load DPCore into a BaseBoard. It also gives a simple test to demonstrate that the whole system is working.
Contents:
Overview: The BaseBoard4 supports up to ten different peripherals all of which share a single USB link to a host computer. A program, dpdaemon, on the host computer handles communication with the BaseBoard and performs the multiplexing and demultiplexing needed to give each peripheral its own set of device nodes for data and configuration. When dpdaemon starts it gets a list of peripherals built into the DPCore by interrogating the BaseBoard. Dpdaemon uses this list to create the directories and device nodes for each peripheral. All peripheral device nodes are either a fanout device or a proxy device and these two drivers must be loaded before running dpdaemon. Installing Pin Peripherals requires building and installing the two drivers, building and installing the daemon, and getting a copy of DPCore that has the peripherals you want. At each boot you need to load fanout and proxy into the kernel, load DPCore onto the BaseBoard, and start dpdaemon. Requirements: Both the drivers and dpdaemon are written in C so the GCC tool chain is needed. Building and installing the drivers requires the kernel headers as well. You also need your copy of DPCore.bin that contains the peripherals you want. Get your copy of DPCore.bin by visiting the Demand Peripherals web site and selecting "Support" and "Build Your FPGA Image". Complete the web form to specify which peripherals you want and enter the email address where the completed DPCore.bin file should be sent. Go here to get your version of DPCore.
Procedure:
Download, build, and install the drivers with the following commands:
Download, build, and install dpdaemon with the following commands:
At Boot Time:
Before running dpdaemon you need to load the two kernel drivers and load
DPCore onto the FPGA. The following commands would normally be placed in
rc.local but, using sudo, can also be run any time you want to
start dpdaemon after a reboot.
Test:
Peripheral #1, the buttons and LEDs on the BaseBoard, is included in all
versions of DPCore so it can always be used for a simple system test. The
following commands should set the LEDs to a hex value of 0x55 and should
give the digits 0 to 7 depending on the combination of buttons being pressed.
Troubleshooting: Here are a few common problems to watch for when building and installing dpdaemon. Make fails when building the kernel drivers: Be sure the kernel headers are loaded on your system. Depending on your system you may need additional tools or packages to build kernel modules. In general, if you can build the Linux kernel you should be able to build fanout and proxy without any problems. Dpdaemon can not find one of its .so files: Be sure to install the dpdaemon libraries in a directory that is in your library search path. Look at /etc/ld.so.conf to find these directories. Depending on your system you may also have to run the ldconfig command after installation. If all else fails you should be able to set LD_LIBRARY_PATH to the dpdaemon library directory before starting dpdaemon. No /dev/dp0 directories are created: Be sure to run the stty command or you find that the download turns on the green LED on the BaseBoard4 and that dpdaemon seems to start OK, but the /dev/dp0 directories are not created. You may want to test the BaseBoard4 by following the directions in the BaseBoard4 Hardware Reference Manual.
|
|