doc/copcican_linux_howto.txt
author gabriele at naustech dot com
Thu, 12 Jun 2014 14:07:16 +0200
changeset 791 7740ac6fdedc
parent 630 96919642e99c
permissions -rw-r--r--
Fix : libcanfestival_unix.a not built if examples are not compiled

Problem: when building Canfestival with unix timers 'libcanfestiva_unix.a'
is built only if you build examples too.

Test case:

$ ./configure --timers=unix --can=socket --target=unix
$ make canfestival

...

no errors but 'libcanfestival_unix.a' is not built:
$ find . -name "*.a"
./src/libcanfestival.a

Changing line 90 of 'drivers/unix/Makefile.in' to:
#driver: $(OBJS)
driver: libcanfestival_$(TARGET).a

solves the problem:

$ ./configure --timers=unix --can=socket --target=unix
$ make canfestival

...

$ find . -name "*.a"
./drivers/unix/libcanfestival_unix.a
./src/libcanfestival.a
629
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     1
HOW TO configure CanFestival for a CO-PCICAN card for linux:
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 the user space driver co_pcicanext.ko
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     8
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     9
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    10
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    11
- unpack the package to your target (if not already done)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    12
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    13
- create empty file:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    14
  touch /usr/local/lib/libcanfestival_can_copcican_linux.so
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    15
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    16
- perform package configuration:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    17
  sh ./configure --can=copcican_linux
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    18
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    19
- build the CanFestival library:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    20
  cd src
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    21
  make
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    22
  make install
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    23
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    24
- build the CanFestival Unix library:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    25
  cd drivers/unix
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    26
  make
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    27
  make install
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    28
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    29
BUGFIX:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    30
  copy library into build directory back:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    31
  cp /usr/local/lib/libcanfestival_unix.a drivers/unix
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    32
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    33
- build the CO-PCICAN driver interface:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    34
  cd drivers/can_copcican_linux
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    35
  make
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    36
  make install
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    37
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    38
- build the example application:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    39
  cd examples/test_copcican_linux
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    40
  make
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    41
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    42
Run test_copcican_linux to see it works...
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    43
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    44
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    45
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    46
Copyright (C) 2010 Cosateq GmbH & Co.KG
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    47
              http://www.cosateq.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    48
              http://www.scale-rt.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    49