]> rtime.felk.cvut.cz Git - lincan.git/blob - lincan/README
Documentation update to prepare for LinCAN-0.3.2 release.
[lincan.git] / lincan / README
1
2                 Linux CAN Driver (LinCAN) version 0.3.2
3                 Pavel Pisa <pisa@cmp.felk.cvut.cz>
4                         OCERA team member <http://www.ocera.org>
5                         Real-time Systems Laboratory <http://rtlab.felk.cvut.cz/>
6                         Department of Control Engineering, FEE CTU
7
8
9 INTRODUCTION
10 ============
11 The LinCAN is an implementation of the Linux CAN-bus device driver supporting
12 more CAN controller chips and many CAN interface boards. Its development
13 has long history already. The OCERA version of the driver has new better
14 designed internal structure, adds new features (as support for open by multiple
15 applications, select system call) and other enhancements.
16   
17 The driver consist of four main layers:
18   - chip level manipulation routines
19   - board specific support
20   - message queues
21   - user-space API and ABI character device interface
22
23
24 DRIVER HISTORY
25 ==============
26
27 The driver originates in The Linux Lab Project
28   http://www.llp.fu-berlin.de/
29 then it has been first rewritten by Arnaud Westenberg
30   http://home.wanadoo.nl/arnaud/
31 now it is developed and maintained as part of OCERA framework
32   http://www.ocera.org/
33
34 I am unable to contact previous maintainer Arnaud Westenberg
35 (arnaud@wanadoo.nl). If you know something about him, I like
36 to hear it.
37
38 Versions:
39
40 can-0.7.1       latest driver version version published
41                 by Arnaud Westenberg
42
43 can-0.7.1-tm5   the enhanced version with better support of
44                 SJA1000 PeliCAN mode and CAN Ethernet proxy
45                 contributed by Tomasz Motylewski <T.Motylewski@bfad.de>
46
47 can-0.7.1-pi1   the import and usage of previous version for
48 (Dec 2002)      OCERA group purposes
49                 
50 can-0.7.1-pi3.4 enhanced version with select support and rewritten
51 (Mar 2003)      make system for Linux kernels (2.2.x,2.4.x,2.5.x),
52                 interrupts service cleanup and partial redesign
53                 and DEVFS support
54
55 lincan-0.2-pre  heavily rewritten infrastructure of the driver based
56 (Aug 2003)      on atomic slot management of queues
57
58 lincan-0.2      version tested on many bords and 2.2, 2.4, 2.6 Linux
59 (Mar 2004)      and RT-Linux enabled 2.4 Linux kernel
60
61 lincan-0.2.8    possible SMP and HT deadlock fixed, driver can take
62 (Jul 2004)      advantage of CMPXCHG instruction if present on CPU,
63                 added support for CPC-PCI and PCAN-PCI cards,
64                 messages timestamping implemented
65                 partially implemented support for Bosch C_CAN module,
66                 requires more work and real hardware
67
68 lincan-0.3      Changed SJA1000 chip IRQ handling. Enhanced VME
69 (Nov 2004)      and EMS CPC-PCI support and many other changes.
70
71 lincan-0.3.1    Small improvements, RTR read moved into separate IOCTL,
72 (Jul 2005)      initial support for some boards contributed by users
73
74 lincan-0.3.2    Improvements in SJA1000 error handling and reporting,
75 (Feb 2006)      i82527 support fixes, simple UDEV support,
76                 updates for kernels up to 2.6.15 and fully preemptive
77                 kernel compatibility. Support for MX1_DIS1 extension
78                 board for PiMX1 ARM based BCC.
79
80                 
81 The actual version of driver have been latest tested it with
82   - PC104 Advantech PCM3680 dual channel board on 2.4 RT-Linux enabled kernel
83   - PiKRON ISA card on 2.4.and 2.6 Linux kernels
84   - PiKRON CAN extension board for PiMCX1 ARM BCC on 2.6 Linux kernels
85   - BfaD DIMM PC card on 2.4 RT-Linux enabled kernel
86   - KVASER pcican-q on 2.6 Linux kernel
87   - MICROSPACE msmcan on 2.4 Linux and RT-Linux enabled kernel
88   - Unicontrols PCAN ("unican"),PCAN-PCI ("unican-pci"), VCAN  ("unican-vme")
89   - EMS CPC-PCI cards ("ems_cpcpci")
90   - virtual board tested on all systems as wel
91 It takes more time to test driver with more cards.
92 Infrastructure and support for more than 20 boards with more
93 variants is prepared in the sources.
94
95
96 SOURCES AND URLs
97 ================
98
99 The LinCAN driver component page at OCERA web site
100 (not updated to the new version yet)
101
102   http://www.ocera.org/download/components/WP7/lincan-0.3.1.html
103   
104 List of related communication components
105   
106   http://www.ocera.org/download/components/WP7/index.html
107
108 The obtaining LinCAN and other CAN related components
109 from OCERA CVS repository at SourceForge
110
111   EXTCVS=":pserver:anonymous@cvs.ocera.sourceforge.net:/cvsroot/ocera"
112   cvs -d$EXTCVS login
113   cvs -z3 -d$EXTCVS co ocera/components/comm/can
114   
115 Web access into CVS
116
117   http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ocera/ocera/components/comm/can/lincan/
118
119 Experimental directory at maintainer's (Pavel Pisa's) pages 
120
121   http://cmp.felk.cvut.cz/~pisa/can/
122   http://cmp.felk.cvut.cz/~pisa/can/lincan-YYMMDD.tar.gz
123   
124 Please send comments, bug-fixes and enhancements directly to
125 Pavel Pisa <pisa@cmp.felk.cvut.cz> or to OCERA discussion
126 forum <https://sourceforge.net/forum/forum.php?forum_id=170893> 
127 and lists <ocera-development@lists.sourceforge.net>
128
129 Driver documentation can be found at
130
131   http://cmp.felk.cvut.cz/~pisa/can/doc/lincandoc-0.3.pdf
132
133 The anouncements of new version are published at FreshMeat page
134
135   http://freshmeat.net/projects/lincan/
136
137
138 COMPILATION of LinCAN releases
139 ==============================
140
141 Just type 'make' at the command line and driver module should compile
142 without errors for current running kernel. 
143
144 More information can be found in driver documentation at
145   http://cmp.felk.cvut.cz/~pisa/can/
146   http://cmp.felk.cvut.cz/~pisa/can/lincandoc-X.Y.pdf
147   
148 Some releases use experimental OMK make system, which requires
149 recent GNU make program version 3.81beta1 and above.
150 Makefiles can be switched to old ones by script
151
152   sh ./switch-omk2std
153   make
154
155 If you have problem to obtain recent GNU make program,
156
157  ftp://alpha.gnu.org/gnu/make/make-3.81beta4.tar.bz2
158
159 you can use our local copy
160
161   http://cmp.felk.cvut.cz/~pisa/can/make-3.81beta1.tar.gz
162
163
164 COMPILATION from CVS sources without full OCERA tree
165 ====================================================
166   
167 ---------------------------------------------------------------------------
168 Obtaining CVS sources of the CAN components only
169 ---------------------------------------------------------------------------
170   cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ocera login
171   cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ocera co
172          ocera/components/comm/can
173
174 ---------------------------------------------------------------------------
175 Commands to build OCERA CVS CAN components outside OCERA tree
176 ---------------------------------------------------------------------------
177   cd ocera/components/comm/can
178   ./switch2standalone
179   make
180
181 The selection of required features and options can be specified before make 
182 command invocation. Lines containing required changes to config.omk-default 
183 file should be stored in config.omk file. The config.omk is not altered by 
184 OMK system and options defined there override values defined in 
185 config.omk-default file. GNU make program version 3.81beta1 or newer is 
186 required by OMK make-system. If this is problem, LinCAN driver can be 
187 compiled with use of old style Makefiles as well.
188
189 ---------------------------------------------------------------------------
190 Old style Makefiles compilation of the LinCAN driver only
191 ---------------------------------------------------------------------------
192   cd ocera/components/comm/can/lincan
193   ./switch-omk2std
194   make
195
196
197 INSTALLATION
198 ============
199 Type 'make install' for standard make system compilation.
200 The driver should be copied into actual kernel version
201 modules directory "/lib/modules/x.y.z/kernel/drivers/char".
202
203 OMK system requires manual copy of files from "_compiled" tree
204 to its final destinations.
205
206 Create file "lincan.rules" with contents listed below in or linked
207 into "/etc/udev/rules.d" directory to enable automatic device nodes
208 creation for UDEV based system
209
210   # LinCAN driver
211   SUBSYSTEM=="can",GROUP="users",MODE="0660"
212
213 The driver automatic loding can be requested by addition of "lincan"
214 line into "/etc/modules" od Debian based systems.
215
216 The target hardware/board specific options should be added into
217 "/etc/modprobe.conf" file or file with similar functionality for your
218 distribution. The options are discusses in the next paragraph.
219
220 LOADING
221 =======
222
223 To load the driver type:
224 # insmod can.o hw='your hardware' irq='irq number' io='io address' <options>
225 Examples: # insmod can.o hw=pip5 irq=4 io=0x8000
226           # insmod can.o hw=virtual io=0
227
228 The hw argument can be one of:
229 - pip5, for the PIP5 computer by MPL
230 - pip6, for the PIP6 computer by MPL
231 - pip7, for the PIP7 computer by MPL
232 - pip8, for the PIP8 computer by MPL
233 - pccan-q, for the PCcan-Q ISA card by KVASER
234 - pccan-f, for the PCcan-F ISA card by KVASER
235 - pccan-s, for the PCcan-S ISA card by KVASER
236 - pccan-d, for the PCcan-D ISA card by KVASER
237 - pcican-q, for the PCIcan-Q PCI card by KVASER (4x SJA1000)
238 - pcican-d, for the PCIcan-Q PCI card by KVASER (2x SJA1000)
239 - pcican-s, for the PCIcan-Q PCI card by KVASER (1x SJA1000)
240 - smartcan for i82527 based card with indexed access
241 - nsican, for the CAN104 PC/104 card by NSI
242 - cc104, for the CAN104 PC/104 card by Contemporary Controls
243 - aim104, for the AIM104CAN PC/104 card by Arcom Control Systems
244 - pc-i03, for the PC-I03 ISA card by IXXAT
245 - pcm3680, for the PCM-3680 PC/104 card by Advantech
246 - m437, for the M436 PC/104 card by SECO
247 - bfadcan for sja1000 CAN embedded card made by BFAD GmbH
248 - pikronisa for ISA memory mapped sja1000 CAN card made by PiKRON Ltd.
249 - pimx1 for MX1_DIS1 extension board for PiMX1 ARM based BCC
250 - msmcan for MICROSPACE IO space indexed i82527
251 - unican for Unicontrols PCAN card
252 - unican-pci for Unicontrols PCAN-PCI card
253 - unican-vme for Unicontrols VCAN card
254 - ipci165 for IXXAT iPC-I 165 (PCI), requires CONFIG_OC_LINCAN_CARD_ipci165=y
255 - ems_cpcpci for EMS CPC-PCI card
256 - pcan_dongle for PEAK's printer port dongle addapter
257 - oscar for SJA1000 based card connected to ARM LH7A400 SoC
258 - eb8245 for Kontron EB8245 onboard CAN with SJA1000 controller
259 - adlink7841 for ADLINK PCI-7841 dual SJA1000 based card
260 - tscan1 for Technologic Systems' TS-CAN1 single SJA1000 based board
261 - ts7kv for Technologic Systems' TS-7KV Multi-function board with SJA1000
262    both these cards require CONFIG_OC_LINCAN_CARD_tscan1=y
263 - template, for yet unsupported hardware (you need to edit src/template.c)
264 - virtual, CAN channel for testing of software and driver without CAN hardware
265
266 options can be one of:
267 - major=<nr>, major specifies the major number of the driver.
268 - minor=<nr>, you can specify which minor numbers the driver should use for your
269   hardware.
270 - extended=[1|0], configures the driver to use extended message format.
271 - pelican=[1|0], configures the driver to set the CAN chips into pelican mode.
272 - baudrate=<nr>, sets the baudrate of the device(s)
273 - clock_freq=<nr>, the frequency of the CAN quartz
274 - stdmask=<nr>, sets the standard mask of the device
275 - extmask=<nr>, sets the extended mask of the device
276 - mo15mask=<nr>, sets the mask for message object 15 (i82527 only)
277 - processlocal=<nr>, controls distribution of send messages to Rx FIFOs
278                 0, no local outgoing messages delivery to Rx FIFOs
279                 1, default off, but can be controlled by individual filter settings
280                 2, all FIFOs receive local messages
281
282 There's still a lot of work to do, have a look at the TODO file for more
283 information.
284
285 Some boards support is compiled in only, when it is enabled through
286 config.omk file. It has to be stored in same directory as Makefile.rules
287 and config.omk-default is located.