author | greg |
Wed, 14 Oct 2009 16:37:37 +0200 | |
changeset 609 | c59dce78bbad |
parent 567 | 8c71fdc46735 |
child 615 | 1eec2f9a7f5f |
permissions | -rw-r--r-- |
393 | 1 |
\documentclass[12pt,english,a4paper]{book} |
208 | 2 |
\usepackage[T1]{fontenc} |
393 | 3 |
\usepackage[latin9]{inputenc} |
4 |
\usepackage{graphicx} |
|
5 |
\usepackage{amsfonts} |
|
6 |
\usepackage{textcomp} |
|
208 | 7 |
\usepackage{color} |
8 |
\usepackage{calc} |
|
9 |
\usepackage{longtable} |
|
10 |
\usepackage{hyperref} |
|
11 |
\usepackage{graphics} |
|
12 |
\DeclareGraphicsExtensions{.jpg} |
|
13 |
\DeclareGraphicsExtensions{.png} |
|
14 |
\hypersetup{colorlinks=true, linkcolor=blue, filecolor=blue, pagecolor=blue, urlcolor=blue} |
|
15 |
||
16 |
%%%%\%%%%%%%% titre, auteurs, date, etc...%%%%%%%%%%%%%%%%%% |
|
249 | 17 |
\title{\Huge The CanFestival CANOpen stack manual} |
208 | 18 |
\author{Edouard TISSERANT} |
19 |
\date{\today} |
|
20 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
21 |
\setcounter{secnumdepth}{5} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
22 |
\renewcommand\thesection{\arabic{section} -} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
23 |
\renewcommand\thesubsection{\arabic{section}.\arabic{subsection})} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
24 |
\renewcommand\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection})} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
25 |
\renewcommand\theparagraph{\alph{paragraph})} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
26 |
\renewcommand\thesubparagraph{\roman{subparagraph})} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
27 |
|
393 | 28 |
\newcommand{\canopen}{CANopen } |
392
3788feef57e0
Some typo fixes in the manual, thanks to Yegor Yefremov (VisionSystems)
etisserant
parents:
391
diff
changeset
|
29 |
|
208 | 30 |
\begin{document} |
393 | 31 |
{\centering\textsf{\huge The CanFestival \canopen stack manual.}} |
32 |
||
33 |
\renewcommand{\contentsname}{CanFestival v3.0 Manual} |
|
34 |
\setcounter{tocdepth}{2} \tableofcontents{} |
|
35 |
||
36 |
\clearpage{} |
|
37 |
||
208 | 38 |
\section{Introduction} |
393 | 39 |
|
40 |
CanFestival is an OpenSource (LGPL and GPL) \canopen framework. |
|
208 | 41 |
|
42 |
\subsection{The CanFestival project} |
|
393 | 43 |
|
44 |
This project, initiated by Edouard TISSERANT in 2001, has grown thanks |
|
45 |
to Francis DUPIN and other contributors. |
|
46 |
||
47 |
Today, CanFestival focuses on providing an ANSI-C platform independent |
|
48 |
\canopen stack that can be implemented as master or slave nodes on |
|
49 |
PCs, Real-time IPCs, and Microcontrollers. |
|
208 | 50 |
|
51 |
CanFestival is a project supported by Lolitech. |
|
52 |
||
393 | 53 |
|
54 |
\subsection{What is \canopen} |
|
55 |
||
56 |
CANopen is a CAN based high level protocol. It defines some protocols |
|
57 |
to : |
|
58 |
||
208 | 59 |
\begin{enumerate} |
393 | 60 |
\item Configure a CAN network. |
61 |
\item Transmit data to a specific node or in broadcast. |
|
62 |
\item Administrate the network. For example detecting a not responding node. |
|
208 | 63 |
\end{enumerate} |
392
3788feef57e0
Some typo fixes in the manual, thanks to Yegor Yefremov (VisionSystems)
etisserant
parents:
391
diff
changeset
|
64 |
The documentation can be found on the CAN in Automation website : |
208 | 65 |
|
393 | 66 |
\href{http://www.can-cia.de/canopen}{http://www.can-cia.de/canopen} |
67 |
||
68 |
The most important document about \canopen is the normative CiA Draft |
|
69 |
Standard 301, version 4.02. You can now download the specification |
|
70 |
from the CAN in Automation website at no cost. |
|
71 |
||
72 |
To continue reading this document, let us assume that you have read |
|
73 |
some papers introducing \canopen . |
|
74 |
||
208 | 75 |
|
76 |
\section{CanFestival Features} |
|
393 | 77 |
|
78 |
||
208 | 79 |
\subsection{Tools } |
393 | 80 |
|
81 |
The \canopen library is coming with some tools : |
|
82 |
||
208 | 83 |
\begin{enumerate} |
393 | 84 |
\item Object Dictionary editor GUI. WxPython Model-View-Controler based |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
85 |
GUI, that helps a lot in generating object dictionary source code for |
393 | 86 |
each node. |
87 |
\item A configure script, that let you chose compile time options such as |
|
88 |
target CPU/HOST, CAN and TIMER drivers.\\ |
|
89 |
This script has not been generated with autoconf, it has been made |
|
90 |
keeping micro-controller target in mind. |
|
208 | 91 |
\end{enumerate} |
393 | 92 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
93 |
\subsection{Multi-Platform} |
393 | 94 |
|
208 | 95 |
\begin{enumerate} |
393 | 96 |
\item Library source code is C-ANSI. |
97 |
\item Driver and examples coding conventions merely depend on target specific |
|
98 |
contributor/compiler. |
|
208 | 99 |
\item Unix compatible interfaces and examples should compile and run on |
393 | 100 |
any Unix system (tested on GNU/Linux and GNU/FreeBSD). |
208 | 101 |
\end{enumerate} |
393 | 102 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
103 |
\subsection{\canopen standard conformance} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
104 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
105 |
\subsubsection{DS-301} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
106 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
107 |
Supported features should conform to DS301. V.4.02 13 february 2002. |
393 | 108 |
|
208 | 109 |
\begin{enumerate} |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
110 |
\item NMT master and slave |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
111 |
\item Heartbeat consumer and producer |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
112 |
\item NodeGuard slave reponder and basic master without tracking |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
113 |
\item SYNC service |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
114 |
\item SDO multiples client and server, segmented and expedited |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
115 |
\item PDO : TPDO and RPDO, with respect to transmission type |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
116 |
\item PDO mapping from/to OD variables bit per bit. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
117 |
\item EMCY : Send and receive and keeps track of emergency objects |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
118 |
\item Data types : 8 to 64 bits values, fixed length strings. |
208 | 119 |
\end{enumerate} |
393 | 120 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
121 |
\subsubsection{DS-302} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
122 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
123 |
Only concise DFC is supported. |
393 | 124 |
|
517 | 125 |
\subsubsection{DS-305} |
126 |
||
127 |
LSS services are fully supported although they have to be enabled at compile time. Additionally, FastScan LSS service is also optionally enabled. |
|
128 |
||
208 | 129 |
\section{How to start} |
393 | 130 |
|
208 | 131 |
\subsection{Host requirements} |
393 | 132 |
|
208 | 133 |
What you need on your development workstation. |
134 |
||
135 |
\subsubsection{Object Dictionary Editor GUI} |
|
393 | 136 |
|
208 | 137 |
\begin{enumerate} |
138 |
\item Python, with |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
139 |
\item wxPython modules installed (at least version 2.6.3). |
393 | 140 |
\item Gnosis xml tools. (Optional can also be installed locally to the project |
141 |
automatically with the help of a Makefile. Please see {}``Using Dictionary |
|
142 |
Editor GUI'' ) |
|
208 | 143 |
\end{enumerate} |
393 | 144 |
|
145 |
\subsubsection{Linux and Unix-likes} |
|
146 |
||
208 | 147 |
\begin{enumerate} |
393 | 148 |
\item Linux, FreeBSD, Cygwin or any Unix environment with GNU toolchain. |
149 |
\item The GNU C compiler (gcc) or any other ANSI-C compiler for your target |
|
150 |
platform. |
|
208 | 151 |
\item Xpdf, and the official 301\_v04000201.pdf file in order to get GUI |
393 | 152 |
context sensitive help. |
153 |
\item GNU Make |
|
154 |
\item Bash and sed |
|
208 | 155 |
\end{enumerate} |
393 | 156 |
|
208 | 157 |
\subsubsection{Windows (for native win32 target)} |
393 | 158 |
|
208 | 159 |
\begin{enumerate} |
464 | 160 |
\item Visual Studio Express 2005 or worst. |
161 |
\item Microsoft platform SDK (requires Genuine Advantage) |
|
162 |
\item Cygwin (for configuration only) |
|
163 |
\item MinGW/MSYS |
|
208 | 164 |
\end{enumerate} |
393 | 165 |
|
208 | 166 |
\subsection{How to get CanFestival} |
393 | 167 |
|
208 | 168 |
Please always use CVS, this is the best way to get the most reactive |
169 |
support from the developer community : |
|
170 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
171 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
172 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
173 |
cvs -d:pserver:anonymous@lolitech.dyndns.org:/canfestival login |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
174 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
175 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
176 |
(type return, without entering a password) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
177 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
178 |
Then, enter : |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
179 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
180 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
181 |
cvs -z3 -d:pserver:anonymous@lolitech.dyndns.org:/canfestival co -P CanFestival-3 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
182 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
183 |
|
393 | 184 |
|
208 | 185 |
|
186 |
\section{Understanding Canfestival} |
|
393 | 187 |
|
208 | 188 |
\subsection{CanFestival Project tree layout} |
189 |
Simplified directory structure. |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
190 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
191 |
./src ANSI-C source of \canopen stack |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
192 |
./include Exportables Header files |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
193 |
./drivers Interfaces to specific platforms/HW |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
194 |
./drivers/unix Linux and Cygwin OS interface |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
195 |
./drivers/win32 Native Win32 OS interface |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
196 |
./drivers/timers_xeno Xenomai timers/threads (Linux only) |
454 | 197 |
./drivers/timers_rtai Rtai timers/threads (Linux only) |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
198 |
./drivers/timers_kernel Linux kernel timer/threads |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
199 |
./drivers/timers_unix Posix timers/threads (Linux, Cygwin) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
200 |
./drivers/can_virtual_kernel Fake CAN network (kernel space) |
448
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
201 |
./drivers/can_serial Serial point to point and PTY hub (*nix only) |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
202 |
./drivers/can_peak_linux PeakSystem CAN library interface |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
203 |
./drivers/can_peak_win32 PeakSystem PCAN-Light interface |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
204 |
./drivers/can_uvccm_win32 Acacetus's RS232 CAN-uVCCM interface |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
205 |
./drivers/can_virtual Fake CAN network (Linux, Cygwin) |
464 | 206 |
./drivers/can_vcom VScom VSCAN interface |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
207 |
./drivers/hcs12 HCS12 full target interface |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
208 |
./examples Examples |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
209 |
./examples/TestMasterSlave 2 nodes, NMT SYNC SDO PDO, win32+unix |
517 | 210 |
./examples/TestMasterSlaveLSS 3 nodes, NMT SYNC SDO PDO LSS, win32+unix |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
211 |
./examples/TestMasterMicroMod 1 node, control Peak I/O Module, unix |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
212 |
./examples/gene_SYNC_HCS12 Just send periodic SYNC on HCS12 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
213 |
./examples/win32test Ask some DS301 infos to a node (win32) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
214 |
./objdictgen Object Dictionary editor GUI |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
215 |
./objdictgen/config Pre-defined OD profiles |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
216 |
./objdictgen/examples Some examples/test OD |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
217 |
./doc Documentation source |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
218 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
219 |
|
393 | 220 |
|
208 | 221 |
|
222 |
\subsection{Implement CanFestival in your application} |
|
393 | 223 |
|
224 |
\begin{center} |
|
225 |
\includegraphics[width=12cm]{Pictures/10000201000003F9000002CF880931E7} |
|
226 |
\par\end{center} |
|
227 |
||
228 |
\bigskip{} |
|
229 |
||
230 |
||
208 | 231 |
|
232 |
\subsection{CanFestival CAN interfaces} |
|
393 | 233 |
|
208 | 234 |
Because most CAN controllers and drivers implement FIFOs, CanFestival |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
235 |
consider sending message as a non blocking operation. |
208 | 236 |
|
464 | 237 |
In order to prevent reentrant calls to the stack, messages reception |
393 | 238 |
is implemented differently on {\textmu}C and OS.: |
239 |
||
208 | 240 |
\begin{enumerate} |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
241 |
\item {\textmu}C must provide interruption masking, mutually excluding timer and CAN receive interrupts.\\ |
393 | 242 |
|
243 |
||
244 |
||
245 |
\begin{center} |
|
246 |
\includegraphics[width=12cm]{Pictures/10000201000003CA0000016604E6A5EF} |
|
247 |
\par\end{center} |
|
248 |
||
208 | 249 |
\item OS must provide a receive thread, a timer thread and a mutex. CAN |
464 | 250 |
reception should be a blocking operation.\\ |
393 | 251 |
|
252 |
||
253 |
||
254 |
\begin{center} |
|
255 |
\includegraphics[width=12cm]{Pictures/10000201000003F9000002CF8B0CDAEA} |
|
256 |
\par\end{center} |
|
257 |
||
208 | 258 |
\end{enumerate} |
393 | 259 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
260 |
\subsection{CanFestival event scheduling} |
393 | 261 |
|
262 |
A \canopen node must be able to take delayed actions. |
|
208 | 263 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
264 |
For instance, periodic sync emission, heartbeat production or SDO timeout |
208 | 265 |
need to set some alarms that will be called later and do the job. |
266 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
267 |
{\textmu}C generally do not have enough free timers to handle all |
393 | 268 |
the \canopen needs directly. Moreover, CanFestival internal data |
269 |
may be corrupt by reentrant calls. |
|
270 |
||
271 |
CanFestival implement a micro -scheduler (timer.c). It uses only one |
|
208 | 272 |
timer to mimic many timers. It manage an alarm table, and call alarms |
273 |
at desired time. |
|
274 |
||
275 |
\begin{center} |
|
393 | 276 |
\includegraphics[width=12cm]{Pictures/100000000000022C000000DEDAD2140C} |
277 |
\par\end{center} |
|
278 |
||
279 |
Scheduler can handle short clock value ranges limitation found on |
|
280 |
some {\textmu}C. As an example, value range for a 16bit clock counter |
|
281 |
with 4{\textmu}s tick is crossed within 0.26 seconds... Long alarms |
|
282 |
must be segmented. |
|
283 |
||
284 |
Chronogram illustrate a long alarm (A) and a short periodic alarm |
|
285 |
(B), with a A value {\textgreater} clock range {\textgreater} |
|
286 |
B value. Values t0...t8 are successive setTimer call parameter values. |
|
287 |
t1 illustrates an intermediate call to TimeDispatch, caused by a delay |
|
288 |
longer than clock range. Because of long alarm segmentation, at the |
|
289 |
end of t1, TimeDispatch call will not trig any alarm callback. |
|
290 |
||
291 |
\begin{center} |
|
292 |
\includegraphics[width=12cm]{Pictures/1000000000000396000000FFC42573DA} |
|
293 |
\par\end{center} |
|
294 |
||
208 | 295 |
|
296 |
\section{Linux Target} |
|
393 | 297 |
|
208 | 298 |
Linux target is default configure target. |
299 |
||
393 | 300 |
|
208 | 301 |
\subsection{Linux Compilation and installation} |
393 | 302 |
|
303 |
Call ./configure -- help to see all available compile time options. |
|
208 | 304 |
|
305 |
After invoking ./configure with your platform specific switches, just |
|
306 |
type make. |
|
307 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
308 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
309 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
310 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
311 |
./configure [options] |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
312 |
make |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
313 |
make install |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
314 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
315 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
316 |
|
393 | 317 |
|
208 | 318 |
|
319 |
\subsubsection{Standard Linux node} |
|
393 | 320 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
321 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
322 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
323 |
./configure --timers=unix |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
324 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
325 |
|
393 | 326 |
|
327 |
To do a \canopen node running on PC -Linux, you need : |
|
328 |
||
208 | 329 |
\begin{enumerate} |
393 | 330 |
\item A working linux distribution |
331 |
\item One or more Peak system PC CAN interface and the last Peak Linux driver |
|
332 |
installed. |
|
208 | 333 |
\end{enumerate} |
393 | 334 |
|
335 |
\subsubsection{Real -Time Linux node} |
|
336 |
||
454 | 337 |
With Xenomai : |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
338 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
339 |
./configure --timers=xeno |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
340 |
\end{verbatim} |
454 | 341 |
With Rtai : |
342 |
\begin{verbatim} |
|
343 |
./configure --timers=rtai |
|
344 |
\end{verbatim} |
|
393 | 345 |
|
346 |
To do a \canopen node running on PC -Linux, you need : |
|
347 |
||
208 | 348 |
\begin{enumerate} |
454 | 349 |
\item A working Linux distribution patched with XENOMAI (2.1 or greater) or RTAI (3.6). |
393 | 350 |
\item One or more Peak system PC CAN interface and the last Peak Real Time |
351 |
Linux driver installed. |
|
208 | 352 |
\end{enumerate} |
391
7802a7d5584f
Accepted Vladimir Chren linux kernelspace port patch.
etisserant
parents:
284
diff
changeset
|
353 |
|
7802a7d5584f
Accepted Vladimir Chren linux kernelspace port patch.
etisserant
parents:
284
diff
changeset
|
354 |
\subsubsection{Linux kernel node} |
393 | 355 |
|
391
7802a7d5584f
Accepted Vladimir Chren linux kernelspace port patch.
etisserant
parents:
284
diff
changeset
|
356 |
To do a CANopen node running on PC-Linux in kernel space, you need: |
7802a7d5584f
Accepted Vladimir Chren linux kernelspace port patch.
etisserant
parents:
284
diff
changeset
|
357 |
|
393 | 358 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
359 |
\begin{enumerate} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
360 |
\item A working Linux distribution with pre-built 2.6.x.x kernel sources |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
361 |
\item A CAN card driver compatible with CanFestival |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
362 |
\end{enumerate} |
391
7802a7d5584f
Accepted Vladimir Chren linux kernelspace port patch.
etisserant
parents:
284
diff
changeset
|
363 |
|
393 | 364 |
|
208 | 365 |
\subsubsection{CAN devices} |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
366 |
Currently supported CAN devices and corresponding configure switch: |
208 | 367 |
|
368 |
\paragraph{Peak systems} |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
369 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
370 |
./configure --can=peak_linux |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
371 |
\end{verbatim} |
393 | 372 |
PeakSystems CAN interface is automatically chosen as default CAN interface |
373 |
if libpcan is present in the system. |
|
374 |
||
375 |
Please download driver at \href{http://www.peak-system.com/linux}{http://www.peak |
|
376 |
-system.com/linux} and follow instructions in order to install driver |
|
377 |
on your system. |
|
378 |
||
464 | 379 |
\paragraph{Socket-Can (http://socketcan.berlios.de)} |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
380 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
381 |
./configure --can=socket |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
382 |
\end{verbatim} |
393 | 383 |
|
448
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
384 |
\paragraph{Serial} |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
385 |
\begin{verbatim} |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
386 |
./configure --can=serial |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
387 |
\end{verbatim} |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
388 |
The CAN serial driver implements a 1:1 serial connection between 2 CAN devices. |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
389 |
For example, you can connect 2 CANFestival applications via a NULL modem cable. |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
390 |
|
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
391 |
Also with this driver comes a software hub, for up to 16 CANFestival apps to |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
392 |
be connected on a single PC, with an optional connection to another CAN driver. |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
393 |
Note that only the serial driver is supported at this time. The hub uses ptys |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
394 |
(pseudo ttys) available on a *nix like system. |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
395 |
|
208 | 396 |
\paragraph{LinCan} |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
397 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
398 |
./configure --can=lincan |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
399 |
\end{verbatim} |
393 | 400 |
|
208 | 401 |
\paragraph{Virtual CAN interfaces (for test/debug)} |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
402 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
403 |
./configure --can=virtual |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
404 |
or, for kernel space: |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
405 |
./configure --can=kernel_virtual |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
406 |
\end{verbatim} |
208 | 407 |
Virtual CAN interface use Unix pipes to emulate a virtual CAN network. |
408 |
Each message issued from a node is repeat to all other nodes. Currently |
|
409 |
only works with nodes running in the same process, and does not support |
|
464 | 410 |
work with Xenomai or RTAI. |
411 |
||
412 |
\paragraph{VScom} |
|
413 |
\begin{verbatim} |
|
414 |
./configure --can=vscom |
|
415 |
\end{verbatim} |
|
416 |
The VSCAN API archive will be automatically downloaded and decompressed (unzip required). See \href{http://www.vscom.de/1_1_05.htm}{www.vscom.de} for available adapters. |
|
517 | 417 |
|
418 |
\subsubsection{LSS services} |
|
419 |
Canfestival optionally supports LSS services but they must be enabled. |
|
420 |
\begin{verbatim} |
|
421 |
./configure --enable-lss |
|
422 |
\end{verbatim} |
|
423 |
||
424 |
Additionally, the FastScan LSS service can also be enabled. |
|
425 |
\begin{verbatim} |
|
426 |
./configure --enable-lss --enable-lss-fs |
|
427 |
\end{verbatim} |
|
428 |
||
208 | 429 |
\subsection{Testing your CanFestival installation} |
393 | 430 |
|
517 | 431 |
\subsubsection{User space} |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
432 |
|
208 | 433 |
Sample provided in /example/TestMasterSlave is installed into your |
434 |
system during installation. |
|
435 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
436 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
437 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
438 |
TestMasterSlave |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
439 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
440 |
|
208 | 441 |
|
392
3788feef57e0
Some typo fixes in the manual, thanks to Yegor Yefremov (VisionSystems)
etisserant
parents:
391
diff
changeset
|
442 |
Default CAN driver library is libcanfestival\_can\_virtual.so., which |
208 | 443 |
will simply pass CAN messages through Unix pipes between Master and |
393 | 444 |
Slave. |
445 |
||
446 |
You may also want to specify different can interface and define some |
|
447 |
CAN ports. Another example using Peak{\textquotesingle}s dual PCMCIA |
|
448 |
(configure and install with --can=peak) : |
|
449 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
450 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
451 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
452 |
TestMasterSlave -l libcanfestival_can_peak.so -s 40 -m 41 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
453 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
454 |
|
517 | 455 |
If the LSS services are enabled the sample provided in /example/TestMasterSlaveLSS will be also installed. It behaves the same as TestMasterSlave except that there are 2 slave nodes without a valid nodeID so the the initializations is done via the LSS services. If FastScan optional service is enabled the example will use it. |
456 |
||
457 |
\subsubsection{Kernel space} |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
458 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
459 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
460 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
461 |
example/kerneltest |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
462 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
463 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
464 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
465 |
It's based on TestMasterSlave example |
393 | 466 |
and has the same functionality. Uses virtual can driver as default |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
467 |
too. After successful installation you can insert the module by typing: |
393 | 468 |
modprobe canf\_ktest Module control is done by simple console 'canf\_ktest\_console' |
469 |
which is used to start/stop sending data. |
|
470 |
||
391
7802a7d5584f
Accepted Vladimir Chren linux kernelspace port patch.
etisserant
parents:
284
diff
changeset
|
471 |
|
208 | 472 |
\section{Windows Targets} |
393 | 473 |
|
208 | 474 |
CanFestival can be compiled and run on Windows platform. It is possible |
475 |
to use both Cygwin and win32 native runtime environment. |
|
476 |
||
477 |
\subsection{Object Dictionary Editor GUI installation.} |
|
393 | 478 |
|
479 |
Please refer to \hyperlink{a821UsingDictionaryEditorGUIoutline}{8.2.1)Using |
|
480 |
Dictionary Editor GUI} |
|
481 |
||
208 | 482 |
\subsection{CYGWIN} |
393 | 483 |
|
208 | 484 |
\subsubsection{Requirements} |
393 | 485 |
|
208 | 486 |
Cygwin have to be installed with those packages : |
487 |
||
488 |
\begin{enumerate} |
|
393 | 489 |
\item gcc |
490 |
\item unzip |
|
491 |
\item wget |
|
492 |
\item make |
|
208 | 493 |
\end{enumerate} |
494 |
Currently, the only supported CAN devices are PeakSystems ones, with |
|
393 | 495 |
PcanLight driver and library. |
496 |
||
497 |
Please download driver at \href{http://www.peak-system.com/themen/download_gb.html}{http://www.peak |
|
498 |
-system.com/themen/download\_gb.html} \ and follow instructions |
|
499 |
in order to install driver on your system. |
|
208 | 500 |
|
501 |
Install Cygwin as required, and the driver for your Peak CAN device. |
|
502 |
||
503 |
Open a Cygwin terminal, and follow those instructions: |
|
504 |
||
393 | 505 |
|
208 | 506 |
\subsubsection{Cygwin configuration and compilation} |
393 | 507 |
|
508 |
||
509 |
\paragraph{A single node with PcanLight and Peak CAN -USB adapter} |
|
510 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
511 |
Download the PCAN-Light Zip file for your HW ( URL from download |
393 | 512 |
page ): |
513 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
514 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
515 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
516 |
wget http://www.peak -system.com/files/usb.zip |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
517 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
518 |
|
393 | 519 |
|
520 |
Extract its content into your cygwin home (it will create a {}``Disk'' |
|
208 | 521 |
directory): |
522 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
523 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
524 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
525 |
unzip usb.zip |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
526 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
527 |
|
393 | 528 |
|
529 |
Configure CanFestival3 providing path to the desired PcanLight implementation: |
|
530 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
531 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
532 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
533 |
cd CanFestival -3 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
534 |
export PCAN_INCLUDE=~/Disk/PCAN-Light/Api/ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
535 |
export PCAN_HEADER=Pcan_usb.h |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
536 |
export PCAN_LIB=~/Disk/PCAN-Light/Lib/Visual\ C++/Pcan_usb.lib |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
537 |
./configure --can=peak_win32 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
538 |
make |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
539 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
540 |
|
393 | 541 |
|
542 |
In order to test, you have to use another CanFestival node, connect |
|
543 |
with a CAN cable. |
|
544 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
545 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
546 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
547 |
cp ~/Disk/PCAN-Light/Pcan_usb.dll . |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
548 |
./examples/TestMasterSlave/TestMasterSlave \ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
549 |
-l drivers/can\_peak\_win32/cygcan\_peak\_win32.dll \ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
550 |
-S 500K -M none |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
551 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
552 |
|
208 | 553 |
|
554 |
Then, on the other node : |
|
555 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
556 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
557 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
558 |
./TestMasterSlave -l my_driver.so -S none -M 500K |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
559 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
560 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
561 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
562 |
Now messages are being exchanged between master and slave node. |
393 | 563 |
|
564 |
\paragraph{Two nodes with PcanLight and Peak dual PCMCIA -CAN adapter} |
|
565 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
566 |
Download the PCAN-Light Zip file for your HW ( URL from download |
393 | 567 |
page ): |
568 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
569 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
570 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
571 |
wget http://www.peak-system.com/files/pccard.zip |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
572 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
573 |
|
393 | 574 |
|
575 |
Extract its content into your cygwin home (it will create a {}``Disk'' |
|
208 | 576 |
directory): |
577 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
578 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
579 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
580 |
unzip pccard.zip |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
581 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
582 |
|
208 | 583 |
|
584 |
The configure CanFestival3 providing path to the desired PcanLight |
|
585 |
implementation: |
|
586 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
587 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
588 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
589 |
export PCAN_INCLUDE=~/Disk/PCAN-Light/Api/ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
590 |
export PCAN_HEADER=Pcan_pcc.h |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
591 |
export PCAN_LIB=~/Disk/PCAN-Light/Lib/Visual\ C++/Pcan_pcc.lib |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
592 |
export PCAN2_HEADER=Pcan_2pcc.h |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
593 |
export PCAN2_LIB=~/Disk/PCAN-Light/Lib/Visual\ C++/Pcan_2pcc.lib |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
594 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
595 |
|
208 | 596 |
|
597 |
In order to test, just connect together both CAN ports of the PCMCIA |
|
598 |
card. Don{\textquotesingle}t forget 120ohms terminator. |
|
599 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
600 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
601 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
602 |
cp ~/Disk/PCAN-Light/Pcan_pcc.dll . |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
603 |
cp ~/Disk/PCAN-Light/Pcan_2pcc.dll . |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
604 |
./examples/TestMasterSlave/TestMasterSlave \ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
605 |
-l drivers/can_peak_win32/cygcan_peak_win32.dll |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
606 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
607 |
|
208 | 608 |
|
609 |
Messages are then exchanged between master and slave node, both inside |
|
610 |
TestMasterSlave{\textquotesingle}s process. |
|
611 |
||
612 |
\subsection{Visual Studio C++} |
|
393 | 613 |
|
208 | 614 |
\subsubsection{Requirements} |
393 | 615 |
|
208 | 616 |
Minimal Cygwin installation is required at configuration time in order |
617 |
to create specific header files (config.h and cancfg.h). Once this |
|
618 |
files created, cygwin is not necessary any more. |
|
619 |
||
620 |
Project and solution files have been created and tested with Visual |
|
393 | 621 |
Studio Express 2005. Be sure to have installed Microsoft Platform |
622 |
SDK, as recommended at the end of Visual Studio installation. |
|
623 |
||
208 | 624 |
|
625 |
\subsubsection{Configuration with cygwin} |
|
393 | 626 |
|
627 |
Follow instructions given at \hyperlink{Cygwin configuration and compilation}{Cygwin |
|
208 | 628 |
configuration and compilation}, but do neither call make nor do tests, |
629 |
just do configuration steps. This will create headers files accordingly |
|
630 |
to your configuration parameters, and the desired CAN hardware. |
|
631 |
||
393 | 632 |
|
208 | 633 |
\subsubsection{Compilation with Visual Studio} |
393 | 634 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
635 |
You can either load independent {}``{*}.vcproj'' project files |
393 | 636 |
along your own projects in your own solution or load the provided |
637 |
{}``CanFestival -3.vc8.sln'' solution files directly. |
|
638 |
||
639 |
Build CanFestival -3 project first. |
|
640 |
||
208 | 641 |
|
642 |
\paragraph{PcanLight and the can\_peak\_win32 project.} |
|
393 | 643 |
|
208 | 644 |
Chosen Pcan\_xxx.lib and eventually Pcan\_2xxx.lib files must be added |
393 | 645 |
to can\_peak\_win32 \ \ project before build of the DLL. |
646 |
||
208 | 647 |
|
648 |
\subsubsection{Testing} |
|
393 | 649 |
|
650 |
Copy eventually needed dlls (ie : Pcan\_Nxxx.lib) into Release or |
|
651 |
Debug directory, and run the test program: |
|
652 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
653 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
654 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
655 |
TestMasterSlave.exe -l can_peak_win32.dll |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
656 |
\end{verbatim} |
393 | 657 |
|
208 | 658 |
|
282 | 659 |
\subsection{MSYS} |
660 |
||
661 |
||
662 |
\subsubsection{Requirements} |
|
663 |
||
664 |
Download from : http://sourceforge.net/project/showfiles.php?group\_id=2435 |
|
665 |
||
666 |
\begin{enumerate} |
|
393 | 667 |
\item MSYS-1.0.10.exe |
668 |
\item MinGW-5.1.3.exe |
|
669 |
\item mingwPORT (which contains wget-1.9.1) |
|
282 | 670 |
\end{enumerate} |
671 |
Please download driver at http://www.peak-system.com/themen/download\_gb.html |
|
672 |
and follow instructions in order to install driver on your system. |
|
673 |
Install MSYS and MingW as required, and the driver for your Peak CAN |
|
674 |
device. Open a MSYS terminal, and follow those instructions:\\ |
|
675 |
||
676 |
||
677 |
\begin{itemize} |
|
393 | 678 |
\item extract wget-1.9.1-mingwPORT.tar.bz2 |
679 |
\item copy wget.exe in c:\textbackslash{} msys\textbackslash{} 1.0\textbackslash{} |
|
680 |
bin\textbackslash{} |
|
282 | 681 |
\item start MSYS and check the file /etc/fstab contain the line c:/MinGW |
393 | 682 |
/mingw |
282 | 683 |
\end{itemize} |
684 |
||
685 |
\subsubsection{MSYS configuration and compilation} |
|
686 |
||
393 | 687 |
Instructions for compilation are nearly the same as CYGWIN part. |
282 | 688 |
|
689 |
||
690 |
\paragraph{A single node with PcanLight and Peak CAN-USB adapter} |
|
691 |
||
692 |
Download the PCAN-Light Zip file for your HW ( URL from download page |
|
693 |
): |
|
694 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
695 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
696 |
wget http://www.peak-system.com/files/usb.zip |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
697 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
698 |
|
393 | 699 |
Extract its content into your MSYS's home (it will create a \char`\"{} |
700 |
Disk\char`\"{} directory): |
|
701 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
702 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
703 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
704 |
unzip usb.zip |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
705 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
706 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
707 |
|
282 | 708 |
Configure CanFestival3 providing path to the desired PcanLight implementation: |
709 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
710 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
711 |
cd CanFestival-3 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
712 |
export PCAN_INCLUDE=~/Disk/PCAN-Light/Api/ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
713 |
export PCAN_HEADER=Pcan_usb.h |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
714 |
export PCAN_LIB=~/Disk/PCAN-Light/Lib/Visual\ C++/Pcan_usb.lib |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
715 |
./configure --can=peak_win32 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
716 |
make |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
717 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
718 |
|
282 | 719 |
In order to test, you have to use another CanFestival node, connect |
720 |
with a CAN cable. |
|
721 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
722 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
723 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
724 |
cp ~/Disk/PCAN-Light/Pcan_usb.dll . |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
725 |
./examples/TestMasterSlave/TestMasterSlave \ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
726 |
-l drivers/can_peak_win32/cygcan_peak_win32.dll \ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
727 |
-S 500K -M none |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
728 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
729 |
|
282 | 730 |
Then, on the other node : |
731 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
732 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
733 |
./TestMasterSlave -l my_driver.so -S none -M 500K -m 0 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
734 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
735 |
Now messages are being exchanged between master and slave node. |
282 | 736 |
|
737 |
||
738 |
\paragraph{Two nodes with PcanLight and Peak dual PCMCIA-CAN adapter} |
|
739 |
||
740 |
Download the PCAN-Light Zip file for your HW ( URL from download page |
|
741 |
): |
|
742 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
743 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
744 |
wget http://www.peak-system.com/files/pccard.zip |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
745 |
\end{verbatim} |
393 | 746 |
Extract its content into your MSYS's home (it will create a \char`\"{} |
747 |
Disk\char`\"{} directory): |
|
748 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
749 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
750 |
unzip pccard.zip |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
751 |
\end{verbatim} |
282 | 752 |
The configure CanFestival3 providing path to the desired PcanLight |
393 | 753 |
implementation: |
754 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
755 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
756 |
export PCAN_INCLUDE=~/Disk/PCAN-Light/Api/ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
757 |
export PCAN_HEADER=Pcan_pcc.h} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
758 |
export PCAN_LIB=~/Disk/PCAN-Light/Lib/Visual\ C++/Pcan_pcc.lib |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
759 |
export PCAN2_HEADER=Pcan_2pcc.h |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
760 |
export PCAN2_LIB=~/Disk/PCAN-Light/Lib/Visual\ C++/Pcan_2pcc.lib |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
761 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
762 |
|
282 | 763 |
In order to test, just connect together both CAN ports of the PCMCIA |
764 |
card. Don't forget 120ohms terminator. |
|
765 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
766 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
767 |
cp~/Disk/PCAN-Light/Pcan_pcc.dll ~. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
768 |
cp ~/Disk/PCAN-Light/Pcan_2pcc.dll ~. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
769 |
./examples/TestMasterSlave/TestMasterSlave \ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
770 |
-l drivers/can\_peak\_win32/cygcan\_peak\_win32.dll -m 0 -s 1 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
771 |
\end{verbatim} |
282 | 772 |
Messages are then exchanged between master and slave node, both inside |
773 |
TestMasterSlave's process. |
|
774 |
||
208 | 775 |
\section{Motorola HCS12} |
393 | 776 |
|
777 |
The examples have been tested on a MC9S12DG255 mounted on a Elektronikladen |
|
778 |
HCS12 T -board. |
|
779 |
||
780 |
Beware that there are few differences in the MSCAN module of the 68HC12 |
|
781 |
and HCS12 microcontroller. For a HC12, you must adapt the driver that |
|
782 |
we provide for \ the HCS12. |
|
783 |
||
784 |
For the difference MSCAN HC12/HCS12, see the Motorola application |
|
785 |
note AN2011/D. |
|
208 | 786 |
|
787 |
Configure switch: |
|
788 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
789 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
790 |
--target=hcs12 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
791 |
\end{verbatim} |
393 | 792 |
|
793 |
To do a \canopen node running on a microncontroller Motorola MC9S12DP256, |
|
208 | 794 |
you need : |
795 |
||
796 |
\begin{enumerate} |
|
393 | 797 |
\item The compiler GNU gcc for HC11, HC12, HCS12 : m6811 -elf. \\ |
798 |
Download the \textbf{release 3.1} at : \href{http://m68hc11.serveftp.org/m68hc11_pkg_rpm.php}{http://m68hc11.serveftp.org/m68hc11\_pkg\_rpm.php} |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
799 |
\item A board with this chip. We are using the T -board from Electronikladen. |
393 | 800 |
\item At least about 40 kBytes of program memory. |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
801 |
\item A tool to flash the memory. (We are using the high cost Lauterbach |
393 | 802 |
debugger). |
208 | 803 |
\end{enumerate} |
393 | 804 |
|
208 | 805 |
\subsection{Running a HCS12 node} |
393 | 806 |
|
807 |
||
208 | 808 |
\subsubsection{Compiling Canfestival:} |
393 | 809 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
810 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
811 |
./configure --target=hcs12 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
812 |
\end{verbatim} |
393 | 813 |
|
208 | 814 |
|
815 |
\subsubsection{Compiling and building an example} |
|
393 | 816 |
|
817 |
Enter in the folder of an HCS12 example, |
|
818 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
819 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
820 |
make all |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
821 |
\end{verbatim} |
393 | 822 |
|
208 | 823 |
|
824 |
\subsubsection{Flashing the memory :} |
|
393 | 825 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
826 |
Use your preferred loader ! If you are using a debugger Lauterbach, |
393 | 827 |
you can load the bash file : trace32\_flash\_programmer.cmm. It loads |
208 | 828 |
directly the elf file. |
829 |
||
393 | 830 |
|
208 | 831 |
\subsubsection{Connecting to a serial RS232 console :} |
393 | 832 |
|
208 | 833 |
Connect the portS(TxD0) of the HCS12 to a console configured at 19200 |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
834 |
bauds 8N1, via a Max232 chip to adapt the electrical levels. On Linux, |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
835 |
you can use minicom. Connecting to a console is useful to read the |
208 | 836 |
messages, but not required. |
837 |
||
393 | 838 |
|
208 | 839 |
\subsubsection{Connecting to the CAN network :} |
393 | 840 |
|
841 |
Connect the port CAN0 (pin PM0, PM1) to the network via a CAN controller. |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
842 |
On our board, the CAN controller is a PCA82C250 chip. |
393 | 843 |
|
208 | 844 |
|
845 |
\subsubsection{starting the node :} |
|
393 | 846 |
|
208 | 847 |
Press the reset of your HCS12 board. |
848 |
||
393 | 849 |
|
208 | 850 |
\section{Example and test program:} |
393 | 851 |
|
852 |
The {}``examples'' directory contains some test program you can |
|
853 |
use as example for your own developments. |
|
854 |
||
560 | 855 |
\subsection{CANOpenShell} |
856 |
||
857 |
This example provides a node that can execute some user commands through stdin. |
|
858 |
||
859 |
With this example you can: |
|
860 |
\begin{enumerate} |
|
861 |
\item scan network (reset all nodes and display node's bootup message) |
|
862 |
\item start / stop /reset a remote node |
|
863 |
\item get informations about a remote node |
|
864 |
\item read / write a specific entry of a remote node |
|
865 |
\end{enumerate} |
|
866 |
||
867 |
The node can be started as a master node or a slave node. The only difference is |
|
868 |
that when is started as a master, all nodes on the network are reseted. |
|
869 |
||
567 | 870 |
The first command must be the "load" command. |
560 | 871 |
|
872 |
\begin{verbatim} |
|
873 |
**************************************************************************** |
|
874 |
* CANOpenShell * |
|
875 |
* * |
|
876 |
* MANDATORY COMMAND (must be the first command) * |
|
877 |
* load#CanLibraryPath,channel,baudrate,nodeid,type (0:slave, 1:master) * |
|
878 |
* * |
|
879 |
* NETWORK: (if nodeid=0x00 : broadcast) * |
|
880 |
* ssta#nodeid : Start a node * |
|
881 |
* ssto#nodeid : Stop a node * |
|
882 |
* srst#nodeid : Reset a node * |
|
883 |
* scan : Reset all nodes and print message when bootup * |
|
884 |
* wait#seconds : Sleep for n seconds * |
|
885 |
* * |
|
886 |
* SDO: (size in bytes) * |
|
887 |
* info#nodeid * |
|
888 |
* rsdo#nodeid,index,subindex : read sdo * |
|
889 |
* ex : rsdo#42,1018,01 * |
|
890 |
* wsdo#nodeid,index,subindex,size,data : write sdo * |
|
891 |
* ex : wsdo#42,6200,01,01,FF * |
|
892 |
* * |
|
893 |
* Note: All numbers are hex * |
|
894 |
* * |
|
895 |
* help : Display this menu * |
|
896 |
* quit : Quit application * |
|
897 |
**************************************************************************** |
|
898 |
\end{verbatim} |
|
899 |
||
900 |
Minimal launch command : |
|
901 |
\begin{verbatim} |
|
902 |
./CANOpenShell load#libcanfestival_can_peak_linux.so,32,125K,8,0 |
|
903 |
\end{verbatim} |
|
904 |
This command start the node as a slave with nodeid 8 at 125K on channel 32. |
|
905 |
||
906 |
Advanced launch command : |
|
907 |
\begin{verbatim} |
|
908 |
./CANOpenShell load#libcanfestival_can_peak_linux.so,32,125K,8,1 \ |
|
909 |
help \ |
|
910 |
wait#5 \ |
|
911 |
wsdo#42,6200,01,01,FF |
|
912 |
\end{verbatim} |
|
913 |
This command starts the node as a master with nodeid 8 at 125K on channel 32, |
|
914 |
displays help menu, wait 5 seconds for node's NMT bootup, |
|
915 |
and write FF value at index 6200, subindex 01 to the remote node with id 42. |
|
208 | 916 |
|
917 |
\subsection{TestMasterSlave} |
|
393 | 918 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
919 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
920 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
921 |
************************************************************** |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
922 |
* TestMasterSlave * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
923 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
924 |
* A simple example for PC. It does implement 2 CanOpen * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
925 |
* nodes in the same process. A master and a slave. Both * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
926 |
* communicate together, exchanging periodically NMT, SYNC, * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
927 |
* SDO and PDO. Master configure heartbeat producer time * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
928 |
* at 1000 ms for slave node-id 0x02 by concise DCF. * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
929 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
930 |
* Usage: * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
931 |
* ./TestMasterSlave [OPTIONS] * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
932 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
933 |
* OPTIONS: * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
934 |
* -l : Can library ["libcanfestival_can_virtual.so"] * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
935 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
936 |
* Slave: * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
937 |
* -s : bus name ["0"] * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
938 |
* -S : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
939 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
940 |
* Master: * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
941 |
* -m : bus name ["1"] * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
942 |
* -M : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
943 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
944 |
************************************************************** |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
945 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
946 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
947 |
|
560 | 948 |
Notes aboute use of concise DCF : |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
949 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
950 |
In this example, Master configure heartbeat producer time |
393 | 951 |
at 1000 ms for slave node -id 0x02 by concise DCF according DS -302 |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
952 |
profile. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
953 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
954 |
Index 0x1F22, sub-index 0x00 of the master OD, correspond |
393 | 955 |
to the number of entries. This equal to the maximum possible nodeId |
956 |
(127). Each sub -index points to the Node -ID of the device, to which |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
957 |
the configuration belongs. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
958 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
959 |
To add more parameters configurations to the slave, the value |
393 | 960 |
at sub -index 0x02 must be a binary stream (little -endian) following |
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
961 |
this structure : |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
962 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
963 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
964 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
965 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
966 |
(UNS32) nb of entries |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
967 |
(UNS16) index parameter 1 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
968 |
(UNS8) sub -index parameter 1 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
969 |
(UNS32) size data parameter 1 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
970 |
(DOMAIN) data parameter 1 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
971 |
(UNS16) index parameter 2 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
972 |
(UNS8) sub -index parameter 2 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
973 |
(UNS32) size data parameter 2 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
974 |
(DOMAIN) data parameter 2 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
975 |
.... |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
976 |
(UNS16) index parameter n |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
977 |
(UNS8) sub -index parameter n |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
978 |
(UNS32) size data parameter n |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
979 |
(DOMAIN) data parameter n |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
980 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
981 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
982 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
983 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
984 |
So the binary value stream to configure heartbeat producer |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
985 |
time must be : |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
986 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
987 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
988 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
989 |
0100000017100002000000e803 |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
990 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
991 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
992 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
993 |
The slave node is configured just before the Master entering |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
994 |
in Pre\_operational state. |
393 | 995 |
|
208 | 996 |
|
997 |
\subsection{gene\_SYNC\_HCS12 :} |
|
393 | 998 |
|
999 |
This is a simple \canopen node that only send cyclic SYNC message. |
|
1000 |
It demonstrate implementation on HCS12 based board. |
|
1001 |
||
1002 |
\bigskip{} |
|
1003 |
||
1004 |
||
1005 |
||
391
7802a7d5584f
Accepted Vladimir Chren linux kernelspace port patch.
etisserant
parents:
284
diff
changeset
|
1006 |
\subsection{kerneltest :} |
7802a7d5584f
Accepted Vladimir Chren linux kernelspace port patch.
etisserant
parents:
284
diff
changeset
|
1007 |
|
393 | 1008 |
Example based on TestMasterSlave slightly modified to suit kernel |
1009 |
space requisites. It will do the same as TestMasterSlave but in kernel |
|
1010 |
space sending kernel messages (displayed by dmesg for example). It |
|
1011 |
is designed as external kernel module implemented as character device. |
|
1012 |
There is a shell script called 'insert.sh', which will insert the |
|
1013 |
module and create a new device file /dev/canf\_ktest (used to sending |
|
1014 |
commands to module). To actual sending commands you can use simple |
|
1015 |
console named 'canf\_ktest\_console'. The module is dependent on a |
|
1016 |
another separate module 'canfestival.ko' implementing CanOpen stack |
|
1017 |
which exports requisite functions. Canfestival.ko module is then dependent |
|
1018 |
on CAN card driver module, by default CAN virtual driver will be loaded. |
|
1019 |
After installing modules (make install), all dependencies are solved |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1020 |
automatically by kernel. To run the example type: |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1021 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1022 |
sh run.sh |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1023 |
\end{verbatim} |
393 | 1024 |
It will insert required modules, start console, and after quitting |
1025 |
console it'll remove modules from kernel. |
|
1026 |
||
1027 |
\bigskip{} |
|
1028 |
||
1029 |
||
208 | 1030 |
|
1031 |
\subsection{TestMasterMicroMod } |
|
393 | 1032 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1033 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1034 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1035 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1036 |
************************************************************** |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1037 |
* TestMasterMicroMod * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1038 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1039 |
* A simple example for PC. * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1040 |
* A CanOpen master that control a MicroMod module: * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1041 |
* - setup module TPDO 1 transmit type * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1042 |
* - setup module RPDO 1 transmit type * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1043 |
* - setup module hearbeatbeat period * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1044 |
* - disable others TPDOs * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1045 |
* - set state to operational * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1046 |
* - send periodic SYNC * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1047 |
* - send periodic RPDO 1 to Micromod (digital output) * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1048 |
* - listen Micromod's TPDO 1 (digital input) * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1049 |
* - Mapping RPDO 1 bit per bit (digital input) * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1050 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1051 |
* Usage: * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1052 |
* ./TestMasterMicroMod [OPTIONS] * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1053 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1054 |
* OPTIONS: * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1055 |
* -l : Can library ["libcanfestival_can_virtual.so"] * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1056 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1057 |
* Slave: * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1058 |
* -i : Slave Node id format [0x01 , 0x7F] * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1059 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1060 |
* Master: * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1061 |
* -m : bus name ["1"] * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1062 |
* -M : 1M,500K,250K,125K,100K,50K,20K,10K * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1063 |
* * |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1064 |
************************************************************** |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1065 |
\end{verbatim} |
393 | 1066 |
|
517 | 1067 |
\subsection{TestMasterSlaveLSS} |
1068 |
||
1069 |
||
1070 |
\begin{verbatim} |
|
1071 |
************************************************************** |
|
1072 |
* TestMasterSlaveLSS * |
|
1073 |
* * |
|
1074 |
* A LSS example for PC. It does implement 3 CanOpen * |
|
1075 |
* nodes in the same process. A master and 2 slaves. All * |
|
1076 |
* communicate together, exchanging periodically NMT, SYNC, * |
|
1077 |
* SDO and PDO. Master configure heartbeat producer time * |
|
1078 |
* at 1000 ms for the slaves by concise DCF. * |
|
1079 |
* * |
|
1080 |
* Usage: * |
|
1081 |
* ./TestMasterSlaveLSS [OPTIONS] * |
|
1082 |
* * |
|
1083 |
* OPTIONS: * |
|
1084 |
* -l : Can library ["libcanfestival_can_virtual.so"] * |
|
1085 |
* * |
|
1086 |
* SlaveA: * |
|
1087 |
* -a : bus name ["0"] * |
|
1088 |
* -A : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) * |
|
1089 |
* * |
|
1090 |
* SlaveB: * |
|
1091 |
* -b : bus name ["1"] * |
|
1092 |
* -B : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) * |
|
1093 |
* * |
|
1094 |
* Master: * |
|
1095 |
* -m : bus name ["2"] * |
|
1096 |
* -M : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) * |
|
1097 |
* * |
|
1098 |
************************************************************** |
|
1099 |
\end{verbatim} |
|
1100 |
||
1101 |
The function used to request LSS services is \textit{configNetworkNode}. It works similar to \textit{writeNetworkDict} and its model is the following: |
|
1102 |
\begin{verbatim} |
|
1103 |
UNS8 configNetworkNode (CO_Data* d, UNS8 command, void *dat1, void* dat2, |
|
1104 |
LSSCallback_t Callback) |
|
1105 |
\end{verbatim} |
|
1106 |
||
1107 |
\subsection{FastScan} |
|
1108 |
FastScan is a special LSS service that allow the dynamically identification of the slave nodes even if they do not have a valid nodeID. This identification is based on the LSS address, composed by vendor ID, product code, revision number and serial number (refer to the DS305 for more information). The LSS address can be partially known or fully unknown. To represent this fact in Canfestival, we use the structure \textit{lss\_fs\_transfer\_t}. The parameter \textit{FS\_LSS\_ID} is an array of four elements which represents the four elements of the LSS address. The other parameter, \textit{FS\_BitChecked}, is also an array and it represents how many bits of each LSS address element are UNKNOWN. The next example is taken from \textit{TestMasterSlaveLSS}, where only the last two digits (8 bits) of vendor ID and product code are unknown and revision number and serial number are totally unknown. |
|
1109 |
||
1110 |
\begin{verbatim} |
|
1111 |
lss_fs_transfer_t lss_fs; |
|
1112 |
/* The VendorID and ProductCode are partialy known, */ |
|
1113 |
/* except the last two digits (8 bits). */ |
|
1114 |
lss_fs.FS_LSS_ID[0]=Vendor_ID; |
|
1115 |
lss_fs.FS_BitChecked[0]=8; |
|
1116 |
lss_fs.FS_LSS_ID[1]=Product_Code; |
|
1117 |
lss_fs.FS_BitChecked[1]=8; |
|
1118 |
/* serialNumber and RevisionNumber are unknown, */ |
|
1119 |
/* i.e. the 8 digits (32bits) are unknown. */ |
|
1120 |
lss_fs.FS_BitChecked[2]=32; |
|
1121 |
lss_fs.FS_BitChecked[3]=32; |
|
1122 |
res=configNetworkNode(&d,LSS_IDENT_FASTSCAN,&lss_fs,0,CheckLSSAndContinue); |
|
1123 |
\end{verbatim} |
|
208 | 1124 |
|
1125 |
\section{Developing a new node} |
|
393 | 1126 |
|
1127 |
Using provided examples as a base for your new node is generally a |
|
1128 |
good idea. You can also use the provided {*}.od files as a base for |
|
1129 |
your node object dictionary. |
|
1130 |
||
1131 |
Creating a new \canopen node implies to define the Object Dictionary |
|
1132 |
of this node. For that, developer has to provide a C file. This C |
|
1133 |
file contains the definition of all dictionary entries, and some kind |
|
1134 |
of index table that helps the stack to access some entries directly. |
|
1135 |
||
208 | 1136 |
|
1137 |
\subsection{Using Dictionary Editor GUI} |
|
393 | 1138 |
|
1139 |
The Object Dictionary Editor is a WxPython based GUI that is used |
|
1140 |
to create the C file needed to create a new \canopen node. |
|
1141 |
||
208 | 1142 |
|
1143 |
\subsubsection{Installation and usage on Linux} |
|
393 | 1144 |
|
208 | 1145 |
You first have to download and install Gnosis XML modules. This is |
1146 |
automated by a Makefile rule. |
|
1147 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1148 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1149 |
cd objdictgen |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1150 |
make |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1151 |
\end{verbatim} |
208 | 1152 |
|
1153 |
Now start the editor. |
|
1154 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1155 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1156 |
python objdictedit.py [od files...] |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1157 |
\end{verbatim} |
393 | 1158 |
|
208 | 1159 |
|
1160 |
\subsubsection{Installation and usage on Windows} |
|
393 | 1161 |
|
208 | 1162 |
Install Python (at least version 2.4) and wxPython (at least version |
1163 |
2.6.3.2). |
|
1164 |
||
1165 |
Cygwin users can install Gnosis XML utils the same as Linux use. Just |
|
1166 |
call make. |
|
1167 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1168 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1169 |
cd objdictgen |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1170 |
make |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1171 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1172 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1173 |
Others will have to download and install Gnosis XML by hand : |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1174 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1175 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1176 |
Gnosis Utils: |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1177 |
http://freshmeat.net/projects/gnosisxml/ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1178 |
http://www.gnosis.cx/download/ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1179 |
Get latest version. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1180 |
\end{verbatim} |
393 | 1181 |
|
1182 |
Download CanFestival archive and uncompress it. Use windows file explorer |
|
1183 |
to go into CanFestival3\textbackslash{}objdicgten, and double -click |
|
1184 |
on objdictedit.py. |
|
1185 |
||
208 | 1186 |
\subsubsection{About} |
393 | 1187 |
|
1188 |
The Object Dictionary editor GUI is a python application that use |
|
1189 |
the Model-View-Controller design pattern. It depends on WxPython to |
|
208 | 1190 |
display view on any supported platform. |
1191 |
||
393 | 1192 |
\begin{center} |
1193 |
\includegraphics[width=7cm]{Pictures/10000201000001FC000001E5D65E8766} |
|
1194 |
\par\end{center} |
|
1195 |
||
208 | 1196 |
|
1197 |
\subsubsection{Main view} |
|
393 | 1198 |
|
208 | 1199 |
Top list let you choose dictionary section, bottom left list is the |
1200 |
selected index in that dictionary, and bottom right list are edited |
|
393 | 1201 |
sub -indexes. |
1202 |
||
1203 |
\begin{center} |
|
1204 |
\includegraphics[width=12cm]{Pictures/10000201000003E7000001C7B0296577} |
|
1205 |
\par\end{center} |
|
1206 |
||
1207 |
\begin{center} |
|
1208 |
\includegraphics[width=3cm]{Pictures/10000000000000B6000000DF1EDD1E73} |
|
1209 |
\par\end{center} |
|
1210 |
||
1211 |
\begin{center} |
|
1212 |
\includegraphics[width=3cm]{Pictures/10000000000000AC000000C9C3F53FA6} |
|
1213 |
\par\end{center} |
|
1214 |
||
1215 |
\begin{center} |
|
1216 |
\includegraphics[width=3cm]{Pictures/100000000000006D000000A31EC8CB54} |
|
1217 |
\par\end{center} |
|
1218 |
||
1219 |
\begin{center} |
|
1220 |
\includegraphics[width=3cm]{Pictures/10000000000000AA0000006014F74635} |
|
1221 |
\par\end{center} |
|
1222 |
||
208 | 1223 |
|
1224 |
\subsubsection{New node} |
|
393 | 1225 |
|
440
dfcec7403169
Fixes in manual ( removed Node ID setting in objdiectedit screenshots)
etisserant
parents:
394
diff
changeset
|
1226 |
Edit your node name and type. Choose your inherited specific profile. |
dfcec7403169
Fixes in manual ( removed Node ID setting in objdiectedit screenshots)
etisserant
parents:
394
diff
changeset
|
1227 |
|
dfcec7403169
Fixes in manual ( removed Node ID setting in objdiectedit screenshots)
etisserant
parents:
394
diff
changeset
|
1228 |
\begin{center} |
dfcec7403169
Fixes in manual ( removed Node ID setting in objdiectedit screenshots)
etisserant
parents:
394
diff
changeset
|
1229 |
\includegraphics[width=11cm]{Pictures/new_node} |
393 | 1230 |
\par\end{center} |
1231 |
||
208 | 1232 |
|
1233 |
\subsubsection{Node info} |
|
393 | 1234 |
|
440
dfcec7403169
Fixes in manual ( removed Node ID setting in objdiectedit screenshots)
etisserant
parents:
394
diff
changeset
|
1235 |
Edit your node name and type. |
dfcec7403169
Fixes in manual ( removed Node ID setting in objdiectedit screenshots)
etisserant
parents:
394
diff
changeset
|
1236 |
|
dfcec7403169
Fixes in manual ( removed Node ID setting in objdiectedit screenshots)
etisserant
parents:
394
diff
changeset
|
1237 |
\begin{center} |
dfcec7403169
Fixes in manual ( removed Node ID setting in objdiectedit screenshots)
etisserant
parents:
394
diff
changeset
|
1238 |
\includegraphics[width=7cm]{Pictures/node_info} |
393 | 1239 |
\par\end{center} |
1240 |
||
208 | 1241 |
|
1242 |
\subsubsection{Profile editor} |
|
393 | 1243 |
|
1244 |
Chose the used profile to edit. |
|
1245 |
||
1246 |
\begin{center} |
|
1247 |
\includegraphics[width=4cm]{Pictures/10000000000000AB000000C88F594413} |
|
1248 |
\par\end{center} |
|
1249 |
||
1250 |
Pick up optional chosen profile entries. |
|
1251 |
||
1252 |
\begin{center} |
|
1253 |
\includegraphics[width=11cm]{Pictures/10000201000002DE000001D82D89C224} |
|
1254 |
\par\end{center} |
|
1255 |
||
208 | 1256 |
|
1257 |
\subsubsection{User types} |
|
393 | 1258 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1259 |
Use User Types to implement value boundaries, and string length |
393 | 1260 |
|
1261 |
\begin{center} |
|
1262 |
\includegraphics[width=11cm]{Pictures/10000201000001C40000010766961D7F} |
|
1263 |
\par\end{center} |
|
1264 |
||
208 | 1265 |
|
1266 |
\subsubsection{Mapped variable} |
|
393 | 1267 |
|
1268 |
Add your own specific dictionary entries and associated mapped variables. |
|
1269 |
||
1270 |
\begin{center} |
|
1271 |
\includegraphics[width=11cm]{Pictures/10000201000001C4000000DD129D4661} |
|
1272 |
\par\end{center} |
|
1273 |
||
208 | 1274 |
|
1275 |
\subsubsection{Integrated help} |
|
393 | 1276 |
|
1277 |
Using F1 key, you can get context sensitive help. |
|
1278 |
||
1279 |
\begin{center} |
|
1280 |
\includegraphics[width=12cm]{Pictures/10000201000002F30000020B23ED7F67} |
|
1281 |
\par\end{center} |
|
208 | 1282 |
|
1283 |
In order to do that, official 301\_v04000201.pdf file must be placed |
|
1284 |
into doc/ directory, and xpdf must be present on your system. |
|
1285 |
||
393 | 1286 |
F2 key open HTML CanFestival help. |
1287 |
||
1288 |
\begin{center} |
|
1289 |
\includegraphics[width=12cm]{Pictures/10000201000003440000025ACC3FD2F1} |
|
1290 |
\par\end{center} |
|
1291 |
||
208 | 1292 |
|
1293 |
\subsection{Generating the object Dictionary} |
|
393 | 1294 |
|
208 | 1295 |
Once object dictionary has been edited and saved, you have to generate |
1296 |
object dictionary C code for your CanFestival node. |
|
1297 |
||
393 | 1298 |
|
208 | 1299 |
\subsubsection{With GUI} |
393 | 1300 |
|
1301 |
Menu entry {}``File/Build Dictionary''. |
|
1302 |
||
1303 |
\begin{center} |
|
1304 |
\includegraphics[width=4cm]{Pictures/10000201000000B7000000C66AF89CD5} |
|
1305 |
\par\end{center} |
|
208 | 1306 |
|
1307 |
Choose C file to create or overwrite. Header file will be also created |
|
1308 |
with the same prefix as C file. |
|
1309 |
||
393 | 1310 |
|
208 | 1311 |
\subsubsection{With command line} |
393 | 1312 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1313 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1314 |
Usage of objdictgen.py : |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1315 |
python objdictgen.py XMLFilePath CfilePath |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1316 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1317 |
|
393 | 1318 |
|
208 | 1319 |
|
1320 |
\section{FAQ} |
|
393 | 1321 |
|
1322 |
||
208 | 1323 |
\subsection{General} |
393 | 1324 |
|
1325 |
||
208 | 1326 |
\subsubsection{Does the code compiles on Windows ?} |
393 | 1327 |
|
1328 |
Yes, with both Cygwin and Visual Studio C++. |
|
1329 |
||
1330 |
Because \canopen layer is coded with C, put a compilation option |
|
1331 |
/TC or /TP if you plan to mix C++ files. See the MSDN documentation |
|
1332 |
about that. |
|
1333 |
||
1334 |
||
448
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
1335 |
\subsubsection{How to fit the library to an other microcontr�ler ?} |
393 | 1336 |
|
1337 |
First, be sure that you have at least 40K bytes of program memory, |
|
1338 |
and about 2k of RAM. |
|
1339 |
||
1340 |
You have to create target specific interface to HW resources. Take |
|
1341 |
model on bundled interfaces provided in drivers/ and create your own |
|
1342 |
interface. You also have to update Makefile.in files for target specific |
|
1343 |
cflags and options. Choose {--}target= configure switch to compile |
|
1344 |
your specific interface. |
|
1345 |
||
1346 |
You are welcome to contribute -back your own interfaces! Other Canfestival |
|
1347 |
users will use it and provide feedback, tests and enhancements. |
|
1348 |
||
208 | 1349 |
|
1350 |
\subsubsection{Is CanFestival3 conform to DS301 v.4.02 ?} |
|
393 | 1351 |
|
208 | 1352 |
Thanks to Philippe Foureys (IUT of Valence), a slave node have been |
393 | 1353 |
tested with the National Instrument \canopen Conformance Test. It |
1354 |
passed the test with success. |
|
208 | 1355 |
|
1356 |
Some very small unconformity have been found in very unusual situations, |
|
1357 |
for example in the SDO code response to wrong messages. |
|
1358 |
||
393 | 1359 |
|
208 | 1360 |
\subsection{LINUX} |
393 | 1361 |
|
1362 |
||
208 | 1363 |
\subsubsection{How to use a Peaksystem CAN board ?} |
393 | 1364 |
|
1365 |
Just install peak driver and then compile and install Canfestival. |
|
1366 |
Peak driver is detected at compile time. |
|
1367 |
||
208 | 1368 |
|
1369 |
\subsubsection{How to use an unsupported CAN board ?} |
|
393 | 1370 |
|
208 | 1371 |
You have to install the specific driver on your system, with necessary |
393 | 1372 |
libs and headers. |
1373 |
||
1374 |
Use can\_peak.c/h or can\_virtual.c/h as an example, and adapt it |
|
1375 |
to your driver API. |
|
1376 |
||
1377 |
Execute configure script and choose --can=mydriver |
|
1378 |
||
208 | 1379 |
|
1380 |
\subsection{Win32} |
|
393 | 1381 |
|
208 | 1382 |
Compatibility: |
1383 |
||
1384 |
\begin{enumerate} |
|
393 | 1385 |
\item Code was compiled MS VisualStudio 2003.NET and VisualStudio 2005.NET |
1386 |
for WindowsXP \ with ANSI and UNICODE configurations and for WindowsCE |
|
1387 |
5.0. |
|
1388 |
\item Some preliminary testing was done, but not enough to be used in mission |
|
1389 |
critical projects. |
|
208 | 1390 |
\end{enumerate} |
1391 |
Additional Features: |
|
1392 |
||
1393 |
\begin{enumerate} |
|
393 | 1394 |
\item Non -integral integers support implementation UNS24, UNS40, UNS48 |
1395 |
etc. |
|
1396 |
\item When enable debug output with DEBUG\_WAR\_CONSOLE\_ON or DEBUG\_ERR\_CONSOLE\_ON, |
|
1397 |
you can navigate in CanFestival source code by double clicking at |
|
1398 |
diagnostic lines in VisualStudio.NET 200X Debug Output Window. |
|
208 | 1399 |
\end{enumerate} |
393 | 1400 |
Custom size integral types such as INTEGER24, UNS40, INTEGER56 etc. |
1401 |
have been defined as 64 bits integers. You will need to replace sizeof(TYPE) |
|
208 | 1402 |
operators to sizeof\_TYPE definitions in generated code, i.e. replace |
1403 |
sizeof(UNS40) with sizeof\_UNS40. |
|
1404 |
||
1405 |
||
1406 |
\subsection{HCS12} |
|
393 | 1407 |
|
1408 |
||
208 | 1409 |
\subsubsection{Which board are you using ?} |
393 | 1410 |
|
1411 |
A T -board from elektronikladen with a MC9S12DP256 or MC9S12DG256. |
|
1412 |
||
1413 |
||
1414 |
\subsubsection{Does the code compile with an other compiler than GNU gcc ?} |
|
1415 |
||
1416 |
It is known to work with Metrowerks CodeWarrior. Here are some tips |
|
1417 |
from Philippe Foureys. : |
|
1418 |
||
208 | 1419 |
|
1420 |
\paragraph{Interrupt functions} |
|
393 | 1421 |
|
1422 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1423 |
\subparagraph{Code for GCC: |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1424 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1425 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1426 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1427 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1428 |
// prototype |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1429 |
void __attribute__((interrupt))timer3Hdl(void): |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1430 |
// function |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1431 |
void __attribute__((interrupt))timer3Hdl(void){...} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1432 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1433 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1434 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1435 |
\subparagraph{Code for CodeWarrior |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1436 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1437 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1438 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1439 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1440 |
// protoype |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1441 |
void interrupt timer3Hdl(void); |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1442 |
// function |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1443 |
pragma CODE_SEG__NEAR_SEG_NON_BANKED |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1444 |
void interrupt timer3Hdl(void) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1445 |
{...} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1446 |
pragma CODE_SEG_DEFAULT\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1447 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1448 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1449 |
\paragraph{Interrupt lock, unlock |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1450 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1451 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1452 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1453 |
\subparagraph{Code for GCC |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1454 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1455 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1456 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1457 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1458 |
void unlock (void) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1459 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1460 |
__asm__ __volatile__("cli"); |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1461 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1462 |
void lock (void) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1463 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1464 |
unsigned short mask; |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1465 |
__asm__ __volatile__("tpa\n\tsei":"=d"(mask)); |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1466 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1467 |
\end{verbatim} |
393 | 1468 |
|
208 | 1469 |
|
1470 |
\subparagraph{Code for CodeWarrior} |
|
393 | 1471 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1472 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1473 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1474 |
void unlock (void) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1475 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1476 |
__asm("cli"); |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1477 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1478 |
void lock (void) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1479 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1480 |
unsigned short mask; |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1481 |
__asm |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1482 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1483 |
tpa:tsei:"=d"(mask); |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1484 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1485 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1486 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1487 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1488 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1489 |
\paragraph{Initialize function} |
393 | 1490 |
|
1491 |
||
208 | 1492 |
\subparagraph{Code for GCC} |
393 | 1493 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1494 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1495 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1496 |
void initCanHCS12 (void) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1497 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1498 |
//Init the HCS12 microcontroler for CanOpen |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1499 |
initHCS12(); |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1500 |
// Init the HCS12 CAN driver |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1501 |
const canBusInit bi0 = { |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1502 |
0, /* no low power */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1503 |
0, /* no time stamp */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1504 |
1, /* enable MSCAN */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1505 |
0, /* clock source : oscillator (In fact, it is not used) */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1506 |
0, /* no loop back */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1507 |
0, /* no listen only */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1508 |
0, /* no low pass filter for wk up */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1509 |
CAN_Baudrates[CAN_BAUDRATE_250K], |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1510 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1511 |
0x00, /* Filter on 16 bits. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1512 |
See Motorola Block Guide V02.14 fig 4-3 */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1513 |
0x00, 0xFF, /* filter 0 hight accept all msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1514 |
0x00, 0xFF, /* filter 0 low accept all msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1515 |
0x00, 0xFF, /* filter 1 hight filter all of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1516 |
0x00, 0xFF, /* filter 1 low filter all of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1517 |
0x00, 0xFF, /* filter 2 hight filter most of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1518 |
0x00, 0xFF, /* filter 2 low filter most of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1519 |
0x00, 0xFF, /* filter 3 hight filter most of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1520 |
0x00, 0xFF, /* filter 3 low filter most of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1521 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1522 |
}; |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1523 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1524 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1525 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1526 |
\subparagraph{Code for CodeWarrior |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1527 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1528 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1529 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1530 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1531 |
void initCanHCS12 (void) |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1532 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1533 |
//Init the HCS12 microcontroler for CanOpen |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1534 |
initHCS12(); |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1535 |
// Init the HCS12 CAN driver |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1536 |
const canBusInit bi0 = { |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1537 |
0, /* no low power */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1538 |
0, /* no time stamp */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1539 |
1, /* enable MSCAN */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1540 |
0, /* clock source : oscillator (In fact, it is not used) */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1541 |
0, /* no loop back */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1542 |
0, /* no listen only */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1543 |
0, /* no low pass filter for wk up */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1544 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1545 |
1, /* clksrc */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1546 |
3, /* brp */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1547 |
0, /* sjw */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1548 |
0, /* samp */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1549 |
1, /* tseg2 */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1550 |
12,/* tseg1 */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1551 |
}, |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1552 |
{ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1553 |
0x00, /* Filter on 16 bits. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1554 |
See Motorola Block Guide V02.14 fig 4-3 */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1555 |
0x00, 0xFF, /* filter 0 hight accept all msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1556 |
0x00, 0xFF, /* filter 0 low accept all msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1557 |
0x00, 0xFF, /* filter 1 hight filter all of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1558 |
0x00, 0xFF, /* filter 1 low filter all of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1559 |
0x00, 0xFF, /* filter 2 hight filter most of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1560 |
0x00, 0xFF, /* filter 2 low filter most of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1561 |
0x00, 0xFF, /* filter 3 hight filter most of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1562 |
0x00, 0xFF, /* filter 3 low filter most of msg */ |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1563 |
} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1564 |
}; |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1565 |
\end{verbatim} |
393 | 1566 |
|
208 | 1567 |
|
1568 |
\subsubsection{Does the code works in banked memory ?} |
|
393 | 1569 |
|
208 | 1570 |
No. Today it seems that the port of gcc is bogged for using the banked |
1571 |
memory. So, unfortunately, we are limited to 48 Kbytes of memory code. |
|
1572 |
||
393 | 1573 |
|
208 | 1574 |
\subsubsection{What GCC version are you using ?} |
393 | 1575 |
|
208 | 1576 |
We are using the stable RPM release 2.2 : |
1577 |
||
1578 |
\begin{enumerate} |
|
393 | 1579 |
\item GNU Gcc 3.0.4. Build 20030501 |
1580 |
\item Newlib 1.10.0 Build 20030421 |
|
1581 |
\item GNU Binutils 2.12.1 Build 20030427 |
|
208 | 1582 |
\end{enumerate} |
393 | 1583 |
|
1584 |
\section{Documentation resources} |
|
1585 |
||
1586 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1587 |
\subsection{CIA : Can in Automation } |
393 | 1588 |
|
1589 |
\href{http://www.can-cia.de/}{http://www.can -cia.de} |
|
1590 |
||
1591 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1592 |
\subsection{Resources and training in \canopen |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1593 |
} |
393 | 1594 |
|
208 | 1595 |
\href{http://www.esacademy.com/}{http://www.esacademy.com} |
1596 |
||
393 | 1597 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1598 |
\subsection{Elektronikladen HCS12 T -board } |
393 | 1599 |
|
208 | 1600 |
\href{http://www.elektronikladen.de/en_hcs12tb.html}{http://www.elektronikladen.de/en\_hcs12tb.html} |
1601 |
||
393 | 1602 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1603 |
\subsection{Gnu gcc compiler for HC12 } |
393 | 1604 |
|
208 | 1605 |
\href{http://m68hc11.serveftp.org/m68hc11_port.php}{http://m68hc11.serveftp.org/m68hc11\_port.php} |
1606 |
||
393 | 1607 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1608 |
\subsection{Motorola documentation on HC12 } |
393 | 1609 |
|
208 | 1610 |
\href{http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC9S12DP256}{http://www.freescale.com/webapp/sps/site/prod\_summary.jsp?code=MC9S12DP256} |
1611 |
||
393 | 1612 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1613 |
\subsection{Lauterbach debugger for HC12 } |
393 | 1614 |
|
208 | 1615 |
\href{http://www.lauterbach.com/}{http://www.lauterbach.com} |
1616 |
||
393 | 1617 |
|
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1618 |
\subsection{Python language } |
393 | 1619 |
|
208 | 1620 |
\href{http://www.python.org/}{http://www.python.org} |
1621 |
||
393 | 1622 |
\clearpage{} |
1623 |
||
1624 |
||
1625 |
\section{About the project} |
|
1626 |
||
1627 |
||
208 | 1628 |
\subsection{Contributors } |
393 | 1629 |
|
1630 |
\begin{center} |
|
1631 |
\includegraphics[width=10cm]{Pictures/1000020100000258000000832C6FFAB4} |
|
1632 |
\par\end{center} |
|
1633 |
||
448
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
1634 |
Unit� mixte de recherche INRETS -LCPC |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
1635 |
|
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
1636 |
sur les Interractions V�hicule -Infrastructure -Conducteur |
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
1637 |
|
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
1638 |
14, route de la mini�re |
208 | 1639 |
|
1640 |
78000 Versailles |
|
1641 |
||
1642 |
FRANCE |
|
1643 |
||
1644 |
Tel : +33 1 40 43 29 01 |
|
1645 |
||
1646 |
\href{http://www.inrets.fr/ur/livic}{http://www.inrets.fr/ur/livic} |
|
1647 |
||
1648 |
\textbf{Contributors :} Francis DUPIN |
|
1649 |
||
393 | 1650 |
Camille BOSSARD |
1651 |
||
1652 |
Laurent ROMIEUX |
|
1653 |
||
1654 |
\bigskip{} |
|
1655 |
||
1656 |
||
1657 |
\begin{center} |
|
1658 |
\includegraphics[width=10cm]{Pictures/100002010000013A0000004A96B0C1FF} |
|
1659 |
\par\end{center} |
|
208 | 1660 |
|
1661 |
LOLITECH |
|
560 | 1662 |
24, rue Pierre Evrat |
208 | 1663 |
204, rue du Haut du Pin |
1664 |
||
560 | 1665 |
88100 Saint-Dié-des-Vosges |
208 | 1666 |
|
1667 |
FRANCE |
|
1668 |
||
560 | 1669 |
Tel : +33 3 29 57 60 42 |
208 | 1670 |
|
1671 |
\href{http://www.lolitech.fr/}{http://www.lolitech.fr} |
|
1672 |
||
393 | 1673 |
\textbf{Contributors :} Edouard TISSERANT (Original author) |
1674 |
||
1675 |
Laurent BESSARD |
|
1676 |
||
1677 |
\bigskip{} |
|
1678 |
||
208 | 1679 |
|
1680 |
Many thanks to the other contributors for their great work: |
|
1681 |
||
393 | 1682 |
Raphael ZULLIGER |
1683 |
||
448
732c33c2d8a7
CAN over Serial link (TTY) interface, with serial hub software. Thanks to James Steward.
etisserant
parents:
440
diff
changeset
|
1684 |
David DUMINY (st� A6R) |
393 | 1685 |
|
1686 |
Zakaria BELAMRI |
|
1687 |
||
208 | 1688 |
|
1689 |
\subsection{Getting support} |
|
393 | 1690 |
|
1691 |
Send your feedback and bug reports to \href{mailto:canfestival-devel@lists.sourceforge.net}{canfestival-devel@lists.sourceforge.net}. |
|
1692 |
||
1693 |
For commercial support, \ training and specific integration and developments, |
|
1694 |
please ask LOLITECH (see contributors). |
|
1695 |
||
208 | 1696 |
|
1697 |
\subsection{Contributing} |
|
393 | 1698 |
|
208 | 1699 |
You are free to contribute your specific interfaces back to the project. |
1700 |
This way, you can hope to get support from CanFestival users community. |
|
1701 |
||
393 | 1702 |
Please send your patch to \href{mailto:canfestival-devel@lists.sourceforge.net}{canfestival |
1703 |
-devel@lists.sourceforge.net}. |
|
1704 |
||
1705 |
Feel free to create some new predefined DS -4xx profiles ({*}.prf) |
|
1706 |
in objdictgen/config, as much as possible respectful to the official |
|
208 | 1707 |
specifications. |
1708 |
||
393 | 1709 |
|
208 | 1710 |
\subsection{License} |
393 | 1711 |
|
1712 |
All the project is licensed with LGPL. This mean you can link CanFestival |
|
1713 |
with any code without being obliged to publish it. |
|
1714 |
||
394
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1715 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1716 |
\begin{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1717 |
#This file is part of CanFestival, a library implementing CanOpen Stack. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1718 |
# |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1719 |
#Copyright (C): Edouard TISSERANT, Francis DUPIN and Laurent BESSARD |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1720 |
# |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1721 |
#See COPYING file for copyrights details. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1722 |
# |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1723 |
#This library is free software; you can redistribute it and/or |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1724 |
#modify it under the terms of the GNU Lesser General Public |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1725 |
#License as published by the Free Software Foundation; either |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1726 |
#version 2.1 of the License, or (at your option) any later version. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1727 |
# |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1728 |
#This library is distributed in the hope that it will be useful, |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1729 |
#but WITHOUT ANY WARRANTY; without even the implied warranty of |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1730 |
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1731 |
#Lesser General Public License for more details. |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1732 |
# |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1733 |
#You should have received a copy of the GNU Lesser General Public |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1734 |
#License along with this library; if not, write to the Free Software |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1735 |
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1736 |
\end{verbatim} |
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1737 |
|
b8755668c9e2
Many changes in manual.tex. Now nearly human readable.
etisserant
parents:
393
diff
changeset
|
1738 |
|
208 | 1739 |
\end{document} |