doc/copcican_linux_howto.txt
author Robert Lehmann <robert.lehmann@sitec-systems.de>
Tue, 28 Jul 2015 16:36:55 +0200
changeset 793 72e9e1064432
parent 630 96919642e99c
permissions -rw-r--r--
timers_unix: Fix termination problem of WaitReceiveTaskEnd

The function pthread_kill sends the Signal thread and to the own process.
If you use this construct than the application which calls uses the
canfestival api will terminate at the call of canClose. To avoid that
use pthread_cancel instead of pthread_kill. To use the pthread_cancel call
you need to set the cancel ability in the thread function. That means
you need to call pthread_setcancelstate and pthread_setcanceltype.
For the termination of the thread at any time it is important to set the
cancel type to PTHREAD_CANCEL_ASYNCHRONOUS.
HOW TO configure CanFestival for a CO-PCICAN card for linux:



pre-actions:
- install the CO-PCICAN card
- install and load the user space driver co_pcicanext.ko



- unpack the package to your target (if not already done)

- create empty file:
  touch /usr/local/lib/libcanfestival_can_copcican_linux.so

- perform package configuration:
  sh ./configure --can=copcican_linux

- build the CanFestival library:
  cd src
  make
  make install

- build the CanFestival Unix library:
  cd drivers/unix
  make
  make install

BUGFIX:
  copy library into build directory back:
  cp /usr/local/lib/libcanfestival_unix.a drivers/unix

- build the CO-PCICAN driver interface:
  cd drivers/can_copcican_linux
  make
  make install

- build the example application:
  cd examples/test_copcican_linux
  make

Run test_copcican_linux to see it works...



Copyright (C) 2010 Cosateq GmbH & Co.KG
              http://www.cosateq.com/
              http://www.scale-rt.com/