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