1 \documentclass[12pt,twoside]{article}
2 \usepackage[ascii]{inputenc}
3 \usepackage[T1]{fontenc}
4 \usepackage[french,english]{babel}
5 \usepackage{amsmath,amssymb,amsfonts,textcomp}
12 \DeclareGraphicsExtensions{.jpg}
13 \DeclareGraphicsExtensions{.png}
14 \hypersetup{colorlinks=true, linkcolor=blue, filecolor=blue, pagecolor=blue, urlcolor=blue}
16 \newenvironment{changemargin}[2]{\begin{list}{}{%
17 \setlength{\topsep}{0pt}%
18 \setlength{\leftmargin}{0pt}%
19 \setlength{\rightmargin}{0pt}%
20 \setlength{\listparindent}{\parindent}%
21 \setlength{\itemindent}{\parindent}%
22 \setlength{\parsep}{0pt plus 1pt}%
23 \addtolength{\leftmargin}{#1}%
24 \addtolength{\rightmargin}{#2}%
28 %%%%\%%%%%%%% titre, auteurs, date, etc...%%%%%%%%%%%%%%%%%%
30 \title{\Huge Documentation}
31 \author{Edouard TISSERANT}
35 \newcommand\textstyleTeletype[1]{\texttt{#1}}
37 \setcounter{secnumdepth}{5}
38 \renewcommand\thesection{\arabic{section} -}
39 \renewcommand\thesubsection{\arabic{section}.\arabic{subsection})}
40 \renewcommand\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection})}
41 \renewcommand\theparagraph{\alph{paragraph})}
42 \renewcommand\thesubparagraph{\roman{subparagraph})}
44 \newcommand\liststyleLi{%
45 \renewcommand\labelitemi{{--}}
46 \renewcommand\labelitemii{{--}}
47 \renewcommand\labelitemiii{{--}}
48 \renewcommand\labelitemiv{{--}}
50 \newcommand\liststyleLii{%
51 \renewcommand\labelitemi{{--}}
52 \renewcommand\labelitemii{{--}}
53 \renewcommand\labelitemiii{{--}}
54 \renewcommand\labelitemiv{{--}}
56 \newcommand\liststyleLiii{%
57 \renewcommand\labelitemi{{--}}
58 \renewcommand\labelitemii{{--}}
59 \renewcommand\labelitemiii{{--}}
60 \renewcommand\labelitemiv{{--}}
62 \newcommand\liststyleLiv{%
63 \renewcommand\labelitemi{{--}}
64 \renewcommand\labelitemii{{--}}
65 \renewcommand\labelitemiii{{--}}
66 \renewcommand\labelitemiv{{--}}
68 \newcommand\liststyleLv{%
69 \renewcommand\labelitemi{{--}}
70 \renewcommand\labelitemii{{--}}
71 \renewcommand\labelitemiii{{--}}
72 \renewcommand\labelitemiv{{--}}
74 \newcommand\liststyleLvi{%
75 \renewcommand\labelitemi{{--}}
76 \renewcommand\labelitemii{{--}}
77 \renewcommand\labelitemiii{{--}}
78 \renewcommand\labelitemiv{{--}}
80 \newcommand\liststyleLvii{%
81 \renewcommand\labelitemi{{--}}
82 \renewcommand\labelitemii{{--}}
83 \renewcommand\labelitemiii{{--}}
84 \renewcommand\labelitemiv{{--}}
86 \newcommand\liststyleLviii{%
87 \renewcommand\labelitemi{{--}}
88 \renewcommand\labelitemii{{--}}
89 \renewcommand\labelitemiii{{--}}
90 \renewcommand\labelitemiv{{--}}
92 \newcommand\liststyleLix{%
93 \renewcommand\labelitemi{{--}}
94 \renewcommand\labelitemii{{--}}
95 \renewcommand\labelitemiii{{--}}
96 \renewcommand\labelitemiv{{--}}
98 \newcommand\liststyleLx{%
99 \renewcommand\labelitemi{{--}}
100 \renewcommand\labelitemii{{--}}
101 \renewcommand\labelitemiii{{--}}
102 \renewcommand\labelitemiv{{--}}
104 \newcommand\liststyleLxi{%
105 \renewcommand\labelitemi{{--}}
106 \renewcommand\labelitemii{{--}}
107 \renewcommand\labelitemiii{{--}}
108 \renewcommand\labelitemiv{{--}}
110 \newcommand\liststyleLxii{%
111 \renewcommand\labelitemi{{--}}
112 \renewcommand\labelitemii{{--}}
113 \renewcommand\labelitemiii{{--}}
114 \renewcommand\labelitemiv{{--}}
116 \newcommand\liststyleLxiii{%
117 \renewcommand\labelitemi{{\textbullet}}
118 \renewcommand\labelitemii{{\textbullet}}
119 \renewcommand\labelitemiii{{\textbullet}}
120 \renewcommand\labelitemiv{{\textbullet}}
122 % Pages styles (master pages)
124 \newcommand\ps@Standard{%
125 \renewcommand\@oddhead{}%
126 \renewcommand\@evenhead{}%
127 \renewcommand\@oddfoot{}%
128 \renewcommand\@evenfoot{\@oddfoot}%
129 \setlength\paperwidth{8.2673in}\setlength\paperheight{11.6925in}\setlength\voffset{-1in}\setlength\hoffset{-1in}\setlength\topmargin{0.1965in}\setlength\headheight{12pt}\setlength\headsep{0cm}\setlength\footskip{12pt+0.1965in}\setlength\textheight{11.6925in-0.1965in-0.7874in-0cm-12pt-0.1965in-12pt}\setlength\oddsidemargin{0.3937in}\setlength\textwidth{8.2673in-0.3937in-0.3937in}
130 \renewcommand\thepage{\arabic{page}}
131 \setlength{\skip\footins}{0.0398in}\renewcommand\footnoterule{\vspace*{-0.0071in}\noindent\textcolor{black}{\rule{0.25\columnwidth}{0.0071in}}\vspace*{0.0398in}}
135 \setlength\tabcolsep{1mm}
136 \renewcommand\arraystretch{1.3}
139 CanFestival3. Version 3.0\newline
140 The CANOpen stack manual
143 \setcounter{tocdepth}{2}
144 \renewcommand\contentsname{Table of contents}
146 \section{Introduction}
147 This document describe the CANOpen layer.CanFestival is an OpenSource
148 (LGPL) CANOpen framework.
150 \subsection{The CanFestival project}
151 This project, initiated by Edouard TISSERANT in 2001, as grown thanks to
152 Francis DUPIN and other contributors.
154 Today, CanFestival focuses on providing an ANSI{}-C platform independent
155 CANOpen stack that can be implemented as master or slave nodes on PCs,
156 Real{}-time IPCs, and Microcontrollers.
158 CanFestival is a project supported by Lolitech.
160 \subsection{What is CANopen}
161 CANopen is a CAN based high level protocol. It defines some protocols to
166 \item Configure a CAN network.
167 \item Transmit data to a specific node or in broadcast.
168 \item Administrate the network. For example detecting a not responding
171 The documentation can be found in the Can in automation website :
173 \href{http://www.can-cia.de/canopen}{http://www.can{}-cia.de/canopen}
175 The most important document about CANopen is the normative CiA Draft
176 Standard 301, version 4.02. You can now download with no cost the
177 specification in Can in automation website.
179 To continue reading this document, let us assume that you have read some
180 papers introducing CANopen.
182 \section{CanFestival Features}
184 The CANopen library is coming with some tools :
188 \item Object Dictionary editor GUI. WxPython Model{}-View{}-Controler
189 based GUI, that help a lot in generating object dictionary source code
191 \item A configure script, that let you chose compile time options such
192 as target CPU/HOST, CAN and TIMER drivers.\newline
193 This script have not been generated with autoconf, it have been made
194 keeping micro{}-controller target in mind.
196 \subsection{Standard conformance}
197 \paragraph{Multi{}-Platform}
200 \item Library source code is C{}-ANSI.
201 \item Driver and examples coding conventions merely depend on target
202 specific contributor/compiler.
203 \item Unix compatible interfaces and examples should compile and run on
204 any Unix system (tested on GNU/Linux and GNU/FreeBSD).
206 \paragraph{CanOpen conformance}
212 \item Should conform to DS301. V.4.02 13 february 2002.
213 \item Master and Slave functionality implemented.
214 \item Sending SYNC implemented.
215 \item 1 SDO server per node. (update: more than one possible. To be more
217 \item Unlimited SDO client.
218 \item SDO transmission mode : normal, expedited download and upload.
219 \item Unlimited PDO receive.
220 \item Unlimited PDO transmit.
221 \item Object Data type implemented : 8, 16, 32 bits values, and fixed
223 \item Slave state full implemented.
224 \item NMT to change slave{\textquotesingle}s state implemented.
225 \item PDO transmission mode : on request, every reception of 0 to n
227 \item NMT Heartbeat implemented : A node can be either heartbeat
228 producer or receiver.
229 \item NMT NodeGuard implemented : Not fully implemented.
230 \item TIME (time Stamp) : Not implemented.
231 \item EMCY (emergency objects) : Not implemented.
232 \item PDO Mapping bit per bit implemented.
239 \item Concise \ DFC : implemented.
241 \section{How to start}
242 \subsection{Host requirements}
243 What you need on your development workstation.
245 \subsubsection{Object Dictionary Editor GUI}
249 \item wxPyhon modules installed (at least version 2.6.3).
250 \item Gnosis xml tools. (Optional can also be installed locally to the
251 project automatically will the help of a Makefile. Please see
252 \hyperlink{a91UsingDictionaryEditorGUIoutline}{9.1) Using Dictionary
255 \subsubsection[\ Linux and Unix{}-likes]{\ Linux and Unix{}-likes}
258 \item Linux, FreeBSD, Cygwin or any Unix environment with GNU toolchain.
259 \item The GNU C compiler (gcc) or any other ANSI{}-C compiler for your
261 \item Xpdf, and the official 301\_v04000201.pdf file in order to get GUI
262 context sensitive help. Download the ds301 at
263 \href{http://www.can-cia.org/downloads/ciaspecifications/?1390}{http://www.can{}-cia.org/downloads/ciaspecifications/?1390}.
267 \subsubsection{Windows (for native win32 target)}
270 \item Visual Studio Express 2005 or worst.
271 \item Microsoft platform SDK (requires Genuine Advantage)
272 \item Cygwin (for configuration only)
274 \subsection{How to get CanFestival}
275 Please always use CVS, this is the best way to get the most reactive
276 support from the developer community :
278 cvs {}-d:pserver:anonymous@lolitech.dyndns.org:/canfestival
280 (type return, without entering a password)
282 Then, enter : \newline
283 cvs {}-z3 {}-d:pserver:anonymous@lolitech.dyndns.org:/canfestival co
286 \section{Understanding Canfestival}
287 \subsection{CanFestival Project tree layout}
288 Simplified directory structure.
291 ./src ANSI{}-C source of CANOpen stack}
294 \ /include Exportables Header files}
297 ./drivers Interfaces to specific platforms/HW}
300 ./drivers/unix Linux and Cygwin OS interface}
303 ./drivers/win32 Native Win32 OS interface}
306 ./drivers/timers\_xeno Xenomai timers/threads (Linux only)}
309 ./drivers/timers\_unix Posix timers/threads (Linux, Cygwin)}
312 ./drivers/can\_peak\_linux PeakSystem CAN library interface}
315 ./drivers/can\_peak\_win32 PeakSystem PCAN{}-Light interface}
318 ./drivers/can\_uvccm\_win32 Acacetus{\textquotesingle}s RS232
319 ``CAN{}-uVCCM'' interface}
322 ./drivers/can\_virtual Fake CAN network (Linux, Cygwin)}
325 ./drivers/hcs12 HCS12 full target interface}
331 ./examples/TestMasterSlave 2 nodes, NMT SYNC SDO PDO, win32+unix}
334 ./examples/TestMasterMicroMod 1 node, control Peak I/O Module, unix}
337 ./examples/gene\_SYNC\_HCS12 Just send periodic SYNC on HCS12}
340 ./examples/win32test Ask some DS301 infos to a node (\textbf{win32)}}
343 ./objdictgen Object Dictionary editor GUI}
346 ./objdictgen/config Pre{}-defined OD profiles}
349 ./objdictgen/examples Some examples/test OD}
352 ./doc Project and CanOpen doc}
354 \subsection{Implement CanFestival in your application}
357 \includegraphics[width=20cm]{Pictures/10000201000003F9000002CF880931E7.png}
362 \subsection{CanFestival CAN interfaces}
363 Because most CAN controllers and drivers implement FIFOs, CanFestival
364 consider sending message as a non bloking operation.
366 In order to prevent reentrent calls to the stack, messages reception is
367 implemented differently on {\textmu}C and OS.:
371 \item {\textmu}C must provide interuption masking for timer and can
374 \includegraphics[width=16cm]{Pictures/10000201000003CA0000016604E6A5EF.png}
376 \item OS must provide a receive thread, a timer thread and a mutex. CAN
377 reception is a bloking operation.\newline
379 \includegraphics[width=16cm]{Pictures/10000201000003F9000002CF8B0CDAEA.png}
382 \subsection{CanFestival events scheduling}
383 A CanOpen node must be able to take delayed actions.
385 As exemples, periodic sync emission, heartbeat production or SDO timeout
386 need to set some alarms that will be called later and do the job.
388 {\textmu}C generaly do not have enough free timers to handle all the
389 CanOpen needs directly. Moreover, CanFestival internal data may be
390 corrupt by reentrant calls.
392 CanFestival implement a micro{}-scheduler (timer.c). It uses only one
393 timer to mimic many timers. It manage an alarm table, and call alarms
397 \includegraphics[width=13cm]{Pictures/100000000000022C000000DEDAD2140C.png}
400 Scheduler can handle short clock value ranges limitation found on some
401 {\textmu}C. As an example, value range for a 16bit clock counter with
402 4{\textmu}s tick is crossed within 0.26 seconds... Long alarms must be
405 Chronogram illustrate a long alarm (A) and a short periodic alarm (B),
406 with a A value {\textgreater} clock range {\textgreater} B value.
407 Values t0...t8 are successive setTimer call parameter values. t1
408 illustrates an intermediate call to TimeDispatch, caused by a delay
409 longer than clock range. Because of long alarm segmentation, at the end
410 of t1, TimeDispatch call will not trig any alarm callback.
413 \includegraphics[width=18cm]{Pictures/1000000000000396000000FFC42573DA.png}
416 \section{Linux Target}
417 Linux target is default configure target.
419 \subsection{Linux Compilation and installation}
420 Call ./configure {--}help to see all available compile time options.
422 After invoking ./configure with your platform specific switches, just
426 ./configure [options]}
432 \textstyleTeletype{make install}}
434 \subsubsection{Standard Linux node}
440 To do a CANopen node running on PC{}-Linux, you need :
444 \item A working linux distribution
445 \item One or more Peak system PC CAN interface and the last Peak Linux
448 \subsubsection{Real{}-Time Linux node}
454 To do a CANopen node running on PC{}-Linux, you need :
458 \item A working Linux distribution patched with XENOMAI 2.1 or greater.
459 \item One or more Peak system PC CAN interface and the last Peak Real
460 Time Linux driver installed.
462 \subsubsection{CAN devices}
463 Curently supported CAN devices and corresponding configure switch:
465 \paragraph{Peak systems}
469 {}-{}-can=peak\_linux}
471 PeakSystems CAN interface is automatically chosen as default CAN
472 interface if libpcan is present in the system.
474 Please download driver at
475 \href{http://www.peak-system.com/linux}{http://www.peak{}-system.com/linux}
476 and follow instructions in order to install driver on your system.
478 \paragraph{Socket{}-Can (http://socketcan.berlios.de)}
490 \paragraph{Virtual CAN interfaces (for test/debug)}
496 Virtual CAN interface use Unix pipes to emulate a virtual CAN network.
497 Each message issued from a node is repeat to all other nodes. Currently
498 only works with nodes running in the same process, and does not support
501 \subsection{Testing your CanFestival installation}
502 Sample provided in /example/TestMasterSlave is installed into your
503 system during installation.
508 Default can driver library is libcanfestival\_can\_virtual.so., which
509 will simply pass CAN messages through Unix pipes between Master and
512 You may also want to specify different can interface and define some CAN
513 ports. An other example using Peak{\textquotesingle}s dual PCMCIA
514 (configure and install with {--}can=peak) :
517 TestMasterSlave {}-l libcanfestival\_can\_peak.so {}-s 40 {}-m 41}
519 \section{Windows Targets}
520 CanFestival can be compiled and run on Windows platform. It is possible
521 to use both Cygwin and win32 native runtime environment.
523 \subsection{Object Dictionary Editor GUI installation.}
525 \hyperlink{a821UsingDictionaryEditorGUIoutline}{8.2.1)Using Dictionary
529 \subsubsection{Requirements}
530 Cygwin have to be installed with those packages :
539 Currently, the only supported CAN devices are PeakSystems ones, with
540 PcanLight driver and library.
542 Please download driver at
543 \href{http://www.peak-system.com/themen/download_gb.html}{http://www.peak{}-system.com/themen/download\_gb.html}
544 \ and follow instructions in order to install driver on your system.
546 Install Cygwin as required, and the driver for your Peak CAN device.
548 Open a Cygwin terminal, and follow those instructions:
550 \subsubsection{Cygwin configuration and compilation}
551 \paragraph{A single node with PcanLight and Peak CAN{}-USB adapter}
552 Download the PCAN{}-Light Zip file for your HW ( URL from download page
556 wget http://www.peak{}-system.com/files/usb.zip}
558 Extract its content into your cygwin home (it will create a ``Disk''
564 Configure CanFestival3 providing path to the desired PcanLight
571 export PCAN\_INCLUDE=\~{}/Disk/PCAN{}-Light/Api/}
574 export PCAN\_HEADER=Pcan\_usb.h}
577 export PCAN\_LIB=\~{}/Disk/PCAN{}-Light/Lib/Visual{\textbackslash}
581 ./configure {}-{--}can=peak\_win32}
586 In order to test, you have to use another CanFestival node, connect with
590 cp \~{}/Disk/PCAN{}-Light/Pcan\_usb.dll .}
593 ./examples/TestMasterSlave/TestMasterSlave {\textbackslash}}
596 {}-l drivers/can\_peak\_win32/cygcan\_peak\_win32.dll
602 Then, on the other node :
605 ./TestMasterSlave {}-l my\_driver.so {}-S none {}-M 500K}
607 Now messages are beeing exchanged between master and slave node.
609 \paragraph{Two nodes with PcanLight and Peak dual PCMCIA{}-CAN adapter}
610 Download the PCAN{}-Light Zip file for your HW ( URL from download page
614 wget http://www.peak{}-system.com/files/pccard.zip}
616 Extract its content into your cygwin home (it will create a ``Disk''
622 The configure CanFestival3 providing path to the desired PcanLight
626 export PCAN\_INCLUDE=\~{}/Disk/PCAN{}-Light/Api/\newline
627 export PCAN\_HEADER=Pcan\_pcc.h\newline
628 export PCAN\_LIB=\~{}/Disk/PCAN{}-Light/Lib/Visual{\textbackslash}
629 C++/Pcan\_pcc.lib\newline
630 export PCAN2\_HEADER=Pcan\_2pcc.\newline
631 export PCAN2\_LIB=\~{}/Disk/PCAN{}-Light/Lib/Visual{\textbackslash}
634 In order to test, just connect together both CAN ports of the PCMCIA
635 card. Don{\textquotesingle}t forget 120ohms terminator.
638 cp \~{}/Disk/PCAN{}-Light/Pcan\_pcc.dll .}
641 cp \~{}/Disk/PCAN{}-Light/Pcan\_2pcc.dll .}
644 ./examples/TestMasterSlave/TestMasterSlave {\textbackslash}}
647 {}-l drivers/can\_peak\_win32/cygcan\_peak\_win32.dll}
649 Messages are then exchanged between master and slave node, both inside
650 TestMasterSlave{\textquotesingle}s process.
652 \subsection{Visual Studio C++}
653 \subsubsection{Requirements}
654 Minimal Cygwin installation is required at configuration time in order
655 to create specific header files (config.h and cancfg.h). Once this
656 files created, cygwin is not necessary any more.
658 Project and solution files have been created and tested with Visual
659 Studio Express 2005. Be sure to have installed Microsoft Platform SDK,
660 as recommended at the end of Visual Studio installation.
662 \subsubsection{Configuration with cygwin}
663 Follow instructions given at
664 \hyperlink{a422Cygwinconfigurationandcompilationoutline}{4.2.2)Cygwin
665 configuration and compilation}, but do neither call make nor do tests,
666 just do configuration steps. This will create headers files accordingly
667 to your configuration parameters, and the desired CAN hardware.
669 \subsubsection{Compilation with Visual Studio}
670 You can either load independents ``*.vcproj'' project files along your
671 own projects in your own solution or load the provided
672 ``CanFestival{}-3.vc8.sln'' solution files directly.
674 Build CanFestival{}-3 project first.
676 \paragraph{PcanLight and the can\_peak\_win32 project.}
677 Chosen Pcan\_xxx.lib and eventually Pcan\_2xxx.lib files must be added
678 to can\_peak\_win32 \ \ project before build of the DLL.
680 \subsubsection{Testing}
681 Copy eventually needed dlls (ie : Pcan\_Nxxx.lib) into Release or Debug
682 directory, and run the test program:
685 TestMasterSlave.exe {}-l can\_peak\_win32.dll}
687 \section{Motorola HCS12}
688 The examples have been tested on a MC9S12DG255 mounted on a
689 Elektronikladen HCS12 T{}-board.
691 Beware that there are a few differences in the MSCAN module of the
692 68HC12 and HCS12 microcontroller. For a HC12, you must adapt the driver
693 that we provide for \ the HCS12.
695 For the difference MSCAN HC12/HCS12, see the Motorola application note
703 To do a CANopen node running on a microncontroller Motorola MC9S12DP256,
708 \item The compiler GNU gcc for HC11, HC12, HCS12 : m6811{}-elf. \newline
709 Download the \textbf{release 3.1} at :
710 \ \href{http://m68hc11.serveftp.org/m68hc11_pkg_rpm.php}{http://m68hc11.serveftp.org/m68hc11\_pkg\_rpm.php}
712 \item A board with this chip. We are using the T{}-board from
714 \item At least about 40 kBytes of program memory.
715 \item A tool to flash the memory. (We are using the hight cost
716 Lauterbach debugger).
718 \subsection{Running a HCS12 node}
719 \subsubsection{Compiling Canfestival:}
721 ./configure {--}target=hcs12}
723 \subsubsection{Compiling and building an example}
724 Enter in the folder of an HCS12 example,
729 \subsubsection{Flashing the memory :}
730 Use your prefered loader ! If you are using a debugger Lauterbach, you
731 can load the bash file : trace32\_flash\_programmer.cmm. It loads
732 directly the elf file.
734 \subsubsection{Connecting to a serial RS232 console :}
735 Connect the portS(TxD0) of the HCS12 to a console configured at 19200
736 bauds 8N1, via a Max232 chip to adapt the electricals levels. On Linux,
737 you can use minicom. Connecting to a console is usefull to read the
738 messages, but not required.
740 \subsubsection{Connecting to the CAN network :}
741 Connect the port CAN0 (pin PM0, PM1) to the network via a CAN
742 controller. On our board, the CAN controler is a PCA82C250 chip.
744 \subsubsection{starting the node :}
745 Press the reset of your HCS12 board.
747 \section{Example and test program:}
748 The ``examples'' directory contains some test program you can use as
749 example for your own developments.
751 \subsection{TestMasterSlave}
753 **************************************************************}
757 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
761 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
764 * \ A simple example for PC. It does implement 2 CanOpen \ \ \ \ \ *}
767 * \ nodes in the same process. A master and a slave. Both \ \ \ \ *}
770 * \ communicate together, exchanging periodically NMT, SYNC, \ *}
773 * \ SDO and PDO. Master configure heartbeat producer time \ \ \ \ *}
776 * \ at 1000 ms for slave node{}-id 0x02 by concise DCF.
781 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
785 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
788 * \ \ ./TestMasterSlave \ [OPTIONS]
789 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
793 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
797 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
800 * \ \ \ \ {}-l : Can library
801 [{\textquotedbl}libcanfestival\_can\_virtual.so{\textquotedbl}]
806 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
810 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
813 * \ \ \ \ {}-s : bus name [{\textquotedbl}0{\textquotedbl}]
814 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
817 * \ \ \ \ {}-S : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) \ *}
821 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
825 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
828 * \ \ \ \ {}-m : bus name [{\textquotedbl}1{\textquotedbl}]
829 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
832 * \ \ \ \ {}-M : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) \ *}
836 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
839 **************************************************************}
845 Notes for Concise DCF :}
851 In this example, Master configure \ heartbeat producer time at 1000 ms
852 for slave node{}-id 0x02 by concise DCF according DS{}-302 profile. }
858 Index 0x1F22 , sub{}-index 0x00 of the master OD, correspond to the
859 number of entries. This equal to the maximum possible nodeId (127).
860 Each sub{}-index points to the Node{}-ID of the device, to which the
861 configuration belongs. }
867 To add more parameters configurations to the slave, the value at
868 sub{}-index 0x02 must be a binary stream (little{}-endian) following
875 [ nb of entries / index parameter 1 / sub{}-index parameter 1 \ / size
876 data parameter 1 \ / data parameter 1 / index parameter n / ...]}
879 \ \ \ \ \ \ (UNS32) \ \ \ \ \ \ \ \ \ \ \ \ (UNS16) (UNS8)
880 \ \ \ \ \ \ \ \ \ \ \ (UNS32) \ \ \ (DOMAIN)}
886 So the binary value stream to configure heartbeat producer time must be
893 0100000017100002000000e803}
899 The slave node is configured just before the Master entering in
900 Pre\_operational state.}
902 \subsection{gene\_SYNC\_HCS12 :}
903 This is a simple CanOpen node that only send cyclic SYNC message. It
904 demonstrate implementation on HCS12 based board.
909 \subsection{TestMasterMicroMod }
911 **************************************************************}
914 * \ TestMasterMicroMod
915 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
919 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
922 * \ A simple example for PC.
923 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
926 * \ A CanOpen master that control a MicroMod module:
930 * \ {}- setup module TPDO 1 transmit type
931 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
934 * \ {}- setup module RPDO 1 transmit type
935 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
938 * \ {}- setup module hearbeatbeat period
939 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
942 * \ {}- disable others TPDOs
943 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
946 * \ {}- set state to operational
947 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
950 * \ {}- send periodic SYNC
951 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
954 * \ {}- send periodic RPDO 1 to Micromod (digital output) \ \ \ \ \ \ *}
957 * \ {}- listen Micromod{\textquotesingle}s TPDO 1 (digital input)
958 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
961 * \ {}- Mapping RPDO 1 bit per bit (digital input)
962 \ \ \ \ \ \ \ \ \ \ \ \ \ *}
966 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
970 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
973 * \ \ ./TestMasterMicroMod \ [OPTIONS]
974 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
978 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
982 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
985 * \ \ \ \ {}-l : Can library
986 [{\textquotedbl}libcanfestival\_can\_virtual.so{\textquotedbl}]
991 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
995 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
998 * \ \ \ \ {}-i : Slave Node id format [0x01 , 0x7F]
999 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
1003 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
1007 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
1010 * \ \ \ \ {}-m : bus name [{\textquotedbl}1{\textquotedbl}]
1011 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
1014 * \ \ \ \ {}-M : 1M,500K,250K,125K,100K,50K,20K,10K
1015 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
1019 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *}
1022 **************************************************************}
1024 \section{Developing a new node}
1025 Using provided examples as a base for your new node is generally a good
1026 idea. You can also use the provided *.od files as a base for your node
1029 Creating a new CanOpen node implies to define the Object Dictionary of
1030 this node. For that, developer have to provide a C file. This C file
1031 contains the definition of all dictionary entries, and some kind of
1032 index table that helps the stack to access some entries directly.
1034 \subsection{Using Dictionary Editor GUI}
1035 The Object Dictionary Editor is a WxPython based GUI that is used to
1036 create the C file needed to create a new CanOpen node.
1038 \subsubsection{Installation and usage on Linux}
1039 You first have to download and install Gnosis XML modules. This is
1040 automated by a Makefile rule.
1048 Now start the editor.
1051 python objdictedit.py [od files...]}
1053 \subsubsection{Installation and usage on Windows}
1054 Install Python (at least version 2.4) and wxPython (at least version
1057 Cygwin users can install Gnosis XML utils the same as Linux use. Just
1066 Others will have to download and intall Gnosis XML by hand :
1072 http://freshmeat.net/projects/gnosisxml/}
1075 http://www.gnosis.cx/download/Gnosis\_Utils.More/Gnosis\_Utils{}-1.2.1.win32{}-py24.exe}
1078 Get latest version.}
1080 Download CanFestival archive and uncompress it. Use windows file
1081 explorer to go into CanFestival3{\textbackslash}objdicgten, and
1082 double{}-click on objdictedit.py.
1084 \subsubsection{About}
1085 The Object Dictionary editor GUI is a python application that use the
1086 Model{}-View{}-Controller design pattern. It depends on WxPython to
1087 display view on any supported platform.
1090 \includegraphics[width=7cm]{Pictures/10000201000001FC000001E5D65E8766.png}
1093 \subsubsection{Main view}
1094 Top list let you choose dictionary section, bottom left list is the
1095 selected index in that dictionary, and bottom right list are edited
1099 \includegraphics[width=14cm]{Pictures/10000201000003E7000001C7B0296577.png}
1103 \includegraphics[width=3cm]{Pictures/10000000000000B6000000DF1EDD1E73.png}
1106 \includegraphics[width=3cm]{Pictures/10000000000000AC000000C9C3F53FA6.png}
1109 \includegraphics[width=3cm]{Pictures/100000000000006D000000A31EC8CB54.png}
1112 \includegraphics[width=3cm]{Pictures/10000000000000AA0000006014F74635.png}
1115 \subsubsection{New node}
1116 Edit your node name, ID and type. Choose your inherited specific
1120 \includegraphics[width=11cm]{Pictures/10000201000001CB0000015F4FC09B68.png}
1123 \subsubsection{Node info}
1124 Edit your node name, ID and type.
1127 \includegraphics[width=7cm]{Pictures/10000201000001010000011DA724D25C.png}
1130 \subsubsection{Profile editor}
1131 Chose the used profile to edit.\newline
1133 \includegraphics[width=4cm]{Pictures/10000000000000AB000000C88F594413.png}
1136 Pick up optional chosen profile entries.\newline
1138 \includegraphics[width=11cm]{Pictures/10000201000002DE000001D82D89C224.png}
1141 \subsubsection{User types}
1142 Use User Types to implement value boundaries, and string lentgth\newline
1144 \includegraphics[width=11cm]{Pictures/10000201000001C40000010766961D7F.png}
1147 \subsubsection{Mapped variable}
1148 Add your own specific dictionary entries and associated mapped
1151 \includegraphics[width=11cm]{Pictures/10000201000001C4000000DD129D4661.png}
1154 \subsubsection{Integrated help}
1155 Using F1 key, you can get context sensitive help.\newline
1157 \includegraphics[width=15cm]{Pictures/10000201000002F30000020B23ED7F67.png}
1160 In order to do that, official 301\_v04000201.pdf file must be placed
1161 into doc/ directory, and xpdf must be present on your system.
1163 F2 key open HTML CanFestival help.\newline
1165 \includegraphics[width=15cm]{Pictures/10000201000003440000025ACC3FD2F1.png}
1168 \subsection{Generating the object Dictionary}
1169 Once object dictionary has been edited and saved, you have to generate
1170 object dictionary C code for your CanFestival node.
1172 \subsubsection{With GUI}
1173 Menu entry ``File/Build Dictionary''.
1176 \includegraphics[width=4cm]{Pictures/10000201000000B7000000C66AF89CD5.png}
1179 Choose C file to create or overwrite. Header file will be also created
1180 with the same prefix as C file.
1182 \subsubsection{With command line}
1184 Usage of objdictgen.py :\newline
1185 python objdictgen.py XMLFilePath CfilePath}
1188 \subsection{General}
1189 \subsubsection{Does the code compiles on Windows ?}
1190 Yes, with both Cygwin and Visual Studio C++.
1192 Because CANopen layer is coded with C, put a compilation option /TC or
1193 /TP if you plan to mix C++ files. See the MSDN documentation about
1196 \subsubsection{How to fit the library to an other microcontr\^oler ?}
1197 First, be sure that you have at least 40K bytes of program memory, and
1200 You have to create target specific interface to HW resources. Take model
1201 on bundled interfaces provided in drivers/ and create your own
1202 interface. You also have to update Makefile.in files for target
1203 specific cflags and options. Chose {--}targer= configure switch to
1204 compile your specific interface.
1206 You are welcome to contribute{}-back your own interfaces ! Other
1207 Canfestival users will use it and provide feedback, tests and
1210 \subsubsection{Is CanFestival3 conform to DS301 v.4.02 ?}
1211 Thanks to Philippe Foureys (IUT of Valence), a slave node have been
1212 tested with the National Instrument CanOpen Conformance Test. It passed
1213 the test with success.
1215 Some very small unconformity have been found in very unusual situations,
1216 for example in the SDO code response to wrong messages.
1219 \subsubsection{How to use a Peaksystem CAN board ?}
1220 Just install peak driver and then compile and install Canfestival. Peak
1221 driver is detected at compile time.
1223 \subsubsection{How to use an unsupported CAN board ?}
1224 You have to install the specific driver on your system, with necessary
1227 Use can\_peak.c/h or can\_virtual.c/h as an example, and adapt it to
1230 Execute configure script and choose {}-{}-can=mydriver
1237 \item Code was compiled MS VisualStudio 2003.NET and VisualStudio
1238 2005.NET for WindowsXP \ with ANSI and UNICODE configurations and for
1240 \item Some preliminary testing was done, but not enough to be used in
1241 mission critical projects.
1243 Additional Features:
1247 \item Non{}-integral integers support implementation UNS24, UNS40, UNS48
1249 \item When enable debug output with DEBUG\_WAR\_CONSOLE\_ON or
1250 DEBUG\_ERR\_CONSOLE\_ON, you can navigate in CanFestival source code by
1251 double clicking at diagnostic lines in VisualStudio.NET 200X Debug
1254 Custom size integral types such as INTEGER24, UNS40, INTEGER56 etc. have
1255 been defined as 64 bits integers. You will need to replace sizeof(TYPE)
1256 operators to sizeof\_TYPE definitions in generated code, i.e. replace
1257 sizeof(UNS40) with sizeof\_UNS40.
1263 \subsubsection{Which board are you using ?}
1264 A T{}-board from elektronikladen with a MC9S12DP256 or MC9S12DG256.
1266 \subsubsection{Does the code compile with an other compiler than GNU gcc
1268 It is known to work with Metrowerks CodeWarrior. Here are some tips from
1271 \paragraph{Interrupt functions}
1272 \subparagraph{Code for GCC:}
1274 // prototype\newline
1275 void \_\_attribute\_\_((interrupt))timer3Hdl(void):\newline
1277 void \_\_attribute\_\_((interrupt))timer3Hdl(void)\{...\}}
1279 \subparagraph{Code for CodeWarrior}
1282 void interrupt timer3Hdl(void);\newline
1284 pragma CODE\_SEG\_\_NEAR\_SEG\_NON\_BANKED\newline
1285 void interrupt timer3Hdl(void)\newline
1287 pragma CODE\_SEG\_DEFAULT}
1289 \paragraph{Interrupt lock, unlock}
1290 \subparagraph{Code for GCC}
1292 void unlock (void)\newline
1295 \_\_volatile\_\_({\textquotedbl}cli{\textquotedbl});\newline
1297 void lock (void)\newline
1299 \ unsigned short mask;\newline
1301 \_\_volatile\_\_({\textquotedbl}tpa{\textbackslash}n{\textbackslash}tsei{\textquotedbl}:{\textquotedbl}=d{\textquotedbl}(mask));\newline
1304 \subparagraph{Code for CodeWarrior}
1306 void unlock (void)\newline
1308 \ \_\_asm({\textquotedbl}cli{\textquotedbl});\newline
1310 void lock (void)\newline
1312 \ unsigned short mask;\newline
1315 \ tpa:tsei:{\textquotedbl}=d{\textquotedbl}(mask);\newline
1319 \paragraph{Initialize function}
1320 \subparagraph{Code for GCC}
1322 void initCanHCS12 (void)\newline
1324 \ //Init the HCS12 microcontroler for CanOpen \newline
1325 \ initHCS12();\newline
1326 \ \ // Init the HCS12 \ CAN driver\newline
1327 \ const canBusInit bi0 = \{\newline
1328 \ \ \ 0, \ \ \ /* no low power \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ */
1330 \ \ \ 0, \ \ \ /* no time stamp
1331 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ */\newline
1332 \ \ \ 1, \ \ \ /* enable MSCAN
1333 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ */\newline
1334 \ \ \ 0, \ \ \ /* clock source : oscillator (In fact, it is not used)
1336 \ \ \ 0, \ \ \ /* no loop back
1337 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ */\newline
1338 \ \ \ 0, \ \ \ /* no listen only
1339 \ \ \ \ \ \ \ \ \ \ \ \ \ \ */\newline
1340 \ \ \ 0, \ \ \ /* no low pass filter for wk up */\newline
1341 \ CAN\_Baudrates[CAN\_BAUDRATE\_250K],\newline
1343 \ \ \ \ \ 0x00, \ \ \ /* Filter on 16 bits.\newline
1344 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ See Motorola Block Guide V02.14 fig
1346 \ \ \ \ \ 0x00, 0xFF, /* filter 0 hight accept all msg
1347 \ \ \ \ \ */\newline
1348 \ \ \ \ \ 0x00, 0xFF, /* filter 0 low accept all msg
1349 \ \ \ \ \ \ \ */\newline
1350 \ \ \ \ \ 0x00, 0xFF, /* filter 1 hight filter all of \ msg
1352 \ \ \ \ \ 0x00, 0xFF, /* filter 1 low filter all of \ msg
1354 \ \ \ \ \ 0x00, 0xFF, /* filter 2 hight filter most of \ msg
1356 \ \ \ \ \ 0x00, 0xFF, /* filter 2 low filter most of \ msg
1358 \ \ \ \ \ 0x00, 0xFF, /* filter 3 hight filter most of \ msg
1360 \ \ \ \ \ 0x00, 0xFF, /* filter 3 low filter most of \ msg
1365 \subparagraph{Code for CodeWarrior}
1367 void initCanHCS12 (void)\newline
1369 \ //Init the HCS12 microcontroler for CanOpen \newline
1370 \ initHCS12();\newline
1371 \ \ // Init the HCS12 \ CAN driver\newline
1372 \ const canBusInit bi0 = \{\newline
1373 \ \ \ 0, \ \ \ /* no low power \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ */
1375 \ \ \ 0, \ \ \ /* no time stamp
1376 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ */\newline
1377 \ \ \ 1, \ \ \ /* enable MSCAN
1378 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ */\newline
1379 \ \ \ 0, \ \ \ /* clock source : oscillator (In fact, it is not used)
1381 \ \ \ 0, \ \ \ /* no loop back
1382 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ */\newline
1383 \ \ \ 0, \ \ \ /* no listen only
1384 \ \ \ \ \ \ \ \ \ \ \ \ \ \ */\newline
1385 \ \ \ 0, \ \ \ /* no low pass filter for wk up */\newline
1387 \ \ \ \ 1, /* clksrc */\newline
1388 \ \ \ \ 3, /* brp \ \ \ */\newline
1389 \ \ \ \ 0, /* sjw \ \ \ */\newline
1390 \ \ \ \ 0, /* samp \ \ */\newline
1391 \ \ \ \ 1, /* tseg2 \ */\newline
1392 \ \ \ \ 12,/* tseg1 \ */\newline
1395 \ \ \ \ \ 0x00, \ \ \ /* Filter on 16 bits.\newline
1396 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ See Motorola Block Guide V02.14 fig
1398 \ \ \ \ \ 0x00, 0xFF, /* filter 0 hight accept all msg
1399 \ \ \ \ \ */\newline
1400 \ \ \ \ \ 0x00, 0xFF, /* filter 0 low accept all msg
1401 \ \ \ \ \ \ \ */\newline
1402 \ \ \ \ \ 0x00, 0xFF, /* filter 1 hight filter all of \ msg
1404 \ \ \ \ \ 0x00, 0xFF, /* filter 1 low filter all of \ msg
1406 \ \ \ \ \ 0x00, 0xFF, /* filter 2 hight filter most of \ msg
1408 \ \ \ \ \ 0x00, 0xFF, /* filter 2 low filter most of \ msg
1410 \ \ \ \ \ 0x00, 0xFF, /* filter 3 hight filter most of \ msg
1412 \ \ \ \ \ 0x00, 0xFF, /* filter 3 low filter most of \ msg
1417 \subsubsection{Who to use warnings and errors messages ?}
1418 \paragraph{Warnings messages}
1419 \begin{longtable}[c]{|p{0.8476598in}|p{0.7761598in}|p{1.0268599in}|p{-0.026640158in}|p{1.0386599in}|p{1.2247599in}|p{1.1761599in}|}
1422 DEBUG\_WAR\_CONSOLE \_ON}
1428 PrintMsg{}-WarTo{}-Console}
1434 Printing long message on console }
1436 \textbf{Printing short message on console.} (number and value only)
1438 \textbf{Sending number and value in a PDO}., only if the node is a
1439 slave, in operational state.
1534 \paragraph{Errors messages}
1535 \begin{longtable}[c]{|p{0.8476598in}|p{0.7351598in}|p{0.6511598in}|p{0.7865598in}|p{-0.026640158in}|p{0.8087598in}|p{0.9955599in}|p{1.1858599in}|}
1538 DEBUG\_ERR\_CONSOLE \_ON}
1547 PrintMsg{}-ErrTo{}-Console}
1553 Printing long message on console}
1555 \textbf{Printing short message on console.} (number and value only)
1557 \textbf{Sending number and value in a PDO}., only if the node is a
1558 slave, in operational state.
1678 \subsubsection{Does the code works in banked memory ?}
1679 No. Today it seems that the port of gcc is bogged for using the banked
1680 memory. So, unfortunately, we are limited to 48 Kbytes of memory code.
1682 \subsubsection{What GCC version are you using ?}
1683 We are using the stable RPM release 2.2 :
1687 \item GNU Gcc 3.0.4. Build 20030501
1688 \item Newlib 1.10.0 Build 20030421
1689 \item GNU Binutils 2.12.1 Build 20030427
1691 \section{Documentation resources}
1692 \paragraph{CIA : Can in Automation}
1693 Many documentation on CANopen.
1695 \href{http://www.can-cia.de/}{http://www.can{}-cia.de}
1697 \paragraph{Resources and training in CANopen}
1698 \href{http://www.esacademy.com/}{http://www.esacademy.com}
1700 \paragraph{Elektronikladen HCS12 T{}-board}
1701 \href{http://www.elektronikladen.de/en_hcs12tb.html}{http://www.elektronikladen.de/en\_hcs12tb.html}
1703 \paragraph{Gnu gcc compiler for HC12}
1704 \href{http://m68hc11.serveftp.org/m68hc11_port.php}{http://m68hc11.serveftp.org/m68hc11\_port.php}
1706 \paragraph{Motorola documentation on HC12}
1707 \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}
1709 \paragraph{Lauterbach debugger for HC12}
1710 \href{http://www.lauterbach.com/}{http://www.lauterbach.com}
1712 \paragraph{Python language}
1713 \href{http://www.python.org/}{http://www.python.org}
1715 \clearpage\section{About the project}
1716 \subsection{Contributors }
1718 \includegraphics[width=10cm]{Pictures/1000020100000258000000832C6FFAB4.png}
1721 Unit\'e mixte de recherche INRETS{}-LCPC
1723 sur les Interractions V\'ehicule{}-Infrastructure{}-Conducteur
1725 14, route de la mini\`ere
1731 Tel : +33 1 40 43 29 01
1733 \href{http://www.inrets.fr/ur/livic}{http://www.inrets.fr/ur/livic}
1735 \textbf{Contributors :} Francis DUPIN
1745 \includegraphics[width=10cm]{Pictures/100002010000013A0000004A96B0C1FF.png}
1750 204, rue du Haut du Pin
1752 88470 Saint{}-Michel sur Meurthe
1756 Tel : +33 3 29 52 95 67
1758 \href{http://www.lolitech.fr/}{http://www.lolitech.fr}
1761 Contributors : \textmd{Edouard TISSERANT (Original author)}}
1769 Many thanks to the other contributors for their great work:
1771 \textmd{ }Raphael ZULLIGER
1773 \textmd{ }David DUMINY (st\'e A6R)
1775 \textmd{ }Zakaria BELAMRI
1777 \subsection{Getting support}
1778 Send your feedback and bug reports to
1779 \href{mailto:canfestival-devel@lists.sourceforge.net}{canfestival{}-devel@lists.sourceforge.net}.
1781 For commercial support, \ training and specific integration and
1782 developments, please ask LOLITECH (see contributors).
1784 \subsection{Contributing}
1785 You are free to contribute your specific interfaces back to the project.
1786 This way, you can hope to get support from CanFestival users community.
1788 Please send your patch to
1789 \href{mailto:canfestival-devel@lists.sourceforge.net}{canfestival{}-devel@lists.sourceforge.net}.
1791 Feel free to create some new predefined DS{}-4xx profiles (*.prf) in
1792 objdictgen/config, as much as possible respectful to the official
1795 \subsection{License}
1796 All the project is licensed with LGPL. This mean you can link
1797 CanFestival with any code without being obliged to publish it.
1800 \#This file is part of CanFestival, a library implementing CanOpen
1803 \#Copyright (C): Edouard TISSERANT, Francis DUPIN and Laurent BESSARD
1806 \#See COPYING file for copyrights details. \newline
1808 \#This library is free software; you can redistribute it and/or \newline
1809 \#modify it under the terms of the GNU Lesser General Public \newline
1810 \#License as published by the Free Software Foundation; either \newline
1811 \#version 2.1 of the License, or (at your option) any later version.
1814 \#This library is distributed in the hope that it will be useful,
1816 \#but WITHOUT ANY WARRANTY; without even the implied warranty of
1818 \#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \ See the GNU
1820 \#Lesser General Public License for more details. \newline
1822 \#You should have received a copy of the GNU Lesser General Public
1824 \#License along with this library; if not, write to the Free Software
1826 \#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1827 \ 02111{}-1307 \ USA }