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