doc/copcican_comedi_howto.txt
author fbeaulier
Tue, 16 Aug 2011 14:15:52 +0200
changeset 663 70fc3603e36f
parent 630 96919642e99c
permissions -rw-r--r--
timers_unix.c : remove sigint and sigterm catch
sdo : Allow multiple servers
The sdo transfer struct is not anymore referenced by server's node id but by
client or server number in the OD. Node id is not relevant in SDO transfert.
629
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     1
HOW TO configure CanFestival for a CO-PCICAN card for COMEDI in the kernel (optionally with Xenomai):
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     2
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     3
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     4
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     5
pre-actions:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     6
- install the CO-PCICAN card
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     7
- install and load COMEDI and the corresponding driver co_pcican.ko
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     8
  (COMEDI sources are expected in /usr/src/comedi)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     9
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    10
- optionally: install the Xenomai package
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    11
  (Xenomai sources are expected in /usr/xenomai)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    12
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    13
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    14
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    15
- unpack the package to your target (if not already done)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    16
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    17
- perform package configuration:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    18
  sh ./configure --can=copcican_comedi --timers=kernel --kerneldir='/lib/modules/$(shell uname -r)/build'
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    19
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    20
  optionally: use --timers=kernel_xeno for the realtime Xenomai timer functions
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    21
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    22
- patch the sed "s:-I:-I$(src)/:g" statement to
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    23
    's:-I../..:-I/canopeninstalldir:g' in drivers/unix/Makefile
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    24
    's:-I..:-I/canopeninstalldir:g'    in src/Makefile
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    25
  The original statement did not run on my computer !
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    26
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    27
- build the CanFestival Unix library:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    28
  cd drivers/unix
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    29
  make
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    30
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    31
- build the CanFestival library:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    32
  cd src
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    33
  make
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    34
  make install
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    35
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    36
- build the CO-PCICAN driver interface:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    37
  cd drivers/can_copcican_comedi
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    38
  make
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    39
  make install
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    40
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    41
- build the example application (not for Xenomai):
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    42
  cd examples/test_copcican_comedi
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    43
  make
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    44
  make install
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    45
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    46
Run test_copcican_comedi with the insert.sh script to see it works...
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    47
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    48
For Xenomai please use the example /usr/src/scale-rt-canopendemo of the SCALE-RT distribution.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    49
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    50
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    51
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    52
Copyright (C) 2010 Cosateq GmbH & Co.KG
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    53
              http://www.cosateq.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    54
              http://www.scale-rt.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    55