doc/manual/en/manual.tex
changeset 464 7d3637f763be
parent 454 bc000083297a
child 517 003679edc437
equal deleted inserted replaced
463:f7455fef585f 464:7d3637f763be
   151 \end{enumerate}
   151 \end{enumerate}
   152 
   152 
   153 \subsubsection{Windows (for native win32 target)}
   153 \subsubsection{Windows (for native win32 target)}
   154 
   154 
   155 \begin{enumerate}
   155 \begin{enumerate}
   156 \item Visual Studio Express 2005 or worst. 
   156 \item Visual Studio Express 2005 or worst.
   157 \item Microsoft platform SDK (requires Genuine Advantage) 
   157 \item Microsoft platform SDK (requires Genuine Advantage)
   158 \item Cygwin (for configuration only) 
   158 \item Cygwin (for configuration only)
       
   159 \item MinGW/MSYS
   159 \end{enumerate}
   160 \end{enumerate}
   160 
   161 
   161 \subsection{How to get CanFestival}
   162 \subsection{How to get CanFestival}
   162 
   163 
   163 Please always use CVS, this is the best way to get the most reactive
   164 Please always use CVS, this is the best way to get the most reactive
   179 
   180 
   180 
   181 
   181 \section{Understanding Canfestival}
   182 \section{Understanding Canfestival}
   182 
   183 
   183 \subsection{CanFestival Project tree layout}
   184 \subsection{CanFestival Project tree layout}
   184 
       
   185 Simplified directory structure.
   185 Simplified directory structure.
   186 
       
   187 \begin{verbatim}
   186 \begin{verbatim}
   188 ./src ANSI-C source of \canopen stack
   187 ./src ANSI-C source of \canopen stack
   189 ./include Exportables Header files
   188 ./include Exportables Header files
   190 ./drivers Interfaces to specific platforms/HW
   189 ./drivers Interfaces to specific platforms/HW
   191 ./drivers/unix Linux and Cygwin OS interface
   190 ./drivers/unix Linux and Cygwin OS interface
   198 ./drivers/can_serial Serial point to point and PTY hub (*nix only)
   197 ./drivers/can_serial Serial point to point and PTY hub (*nix only)
   199 ./drivers/can_peak_linux PeakSystem CAN library interface
   198 ./drivers/can_peak_linux PeakSystem CAN library interface
   200 ./drivers/can_peak_win32 PeakSystem PCAN-Light interface
   199 ./drivers/can_peak_win32 PeakSystem PCAN-Light interface
   201 ./drivers/can_uvccm_win32 Acacetus's RS232 CAN-uVCCM interface
   200 ./drivers/can_uvccm_win32 Acacetus's RS232 CAN-uVCCM interface
   202 ./drivers/can_virtual Fake CAN network (Linux, Cygwin)
   201 ./drivers/can_virtual Fake CAN network (Linux, Cygwin)
       
   202 ./drivers/can_vcom VScom VSCAN interface
   203 ./drivers/hcs12 HCS12 full target interface
   203 ./drivers/hcs12 HCS12 full target interface
   204 ./examples Examples
   204 ./examples Examples
   205 ./examples/TestMasterSlave 2 nodes, NMT SYNC SDO PDO, win32+unix
   205 ./examples/TestMasterSlave 2 nodes, NMT SYNC SDO PDO, win32+unix
   206 ./examples/TestMasterMicroMod 1 node, control Peak I/O Module, unix
   206 ./examples/TestMasterMicroMod 1 node, control Peak I/O Module, unix
   207 ./examples/gene_SYNC_HCS12 Just send periodic SYNC on HCS12
   207 ./examples/gene_SYNC_HCS12 Just send periodic SYNC on HCS12
   227 \subsection{CanFestival CAN interfaces}
   227 \subsection{CanFestival CAN interfaces}
   228 
   228 
   229 Because most CAN controllers and drivers implement FIFOs, CanFestival
   229 Because most CAN controllers and drivers implement FIFOs, CanFestival
   230 consider sending message as a non blocking operation.
   230 consider sending message as a non blocking operation.
   231 
   231 
   232 In order to prevent reentrent calls to the stack, messages reception
   232 In order to prevent reentrant calls to the stack, messages reception
   233 is implemented differently on {\textmu}C and OS.:
   233 is implemented differently on {\textmu}C and OS.:
   234 
   234 
   235 \begin{enumerate}
   235 \begin{enumerate}
   236 \item {\textmu}C must provide interruption masking, mutually excluding timer and CAN receive interrupts.\\
   236 \item {\textmu}C must provide interruption masking, mutually excluding timer and CAN receive interrupts.\\
   237 
   237 
   240 \begin{center}
   240 \begin{center}
   241 \includegraphics[width=12cm]{Pictures/10000201000003CA0000016604E6A5EF} 
   241 \includegraphics[width=12cm]{Pictures/10000201000003CA0000016604E6A5EF} 
   242 \par\end{center}
   242 \par\end{center}
   243 
   243 
   244 \item OS must provide a receive thread, a timer thread and a mutex. CAN
   244 \item OS must provide a receive thread, a timer thread and a mutex. CAN
   245 reception should be a bloking operation.\\
   245 reception should be a blocking operation.\\
   246 
   246 
   247 
   247 
   248 
   248 
   249 \begin{center}
   249 \begin{center}
   250 \includegraphics[width=12cm]{Pictures/10000201000003F9000002CF8B0CDAEA} 
   250 \includegraphics[width=12cm]{Pictures/10000201000003F9000002CF8B0CDAEA} 
   356 \item A CAN card driver compatible with CanFestival
   356 \item A CAN card driver compatible with CanFestival
   357 \end{enumerate}
   357 \end{enumerate}
   358 
   358 
   359 
   359 
   360 \subsubsection{CAN devices}
   360 \subsubsection{CAN devices}
   361 
       
   362 Currently supported CAN devices and corresponding configure switch:
   361 Currently supported CAN devices and corresponding configure switch:
   363 
   362 
   364 
       
   365 \paragraph{Peak systems}
   363 \paragraph{Peak systems}
   366 
       
   367 
       
   368 \begin{verbatim}
   364 \begin{verbatim}
   369 	./configure --can=peak_linux
   365 	./configure --can=peak_linux
   370 \end{verbatim}
   366 \end{verbatim}
   371 
       
   372 
       
   373 PeakSystems CAN interface is automatically chosen as default CAN interface
   367 PeakSystems CAN interface is automatically chosen as default CAN interface
   374 if libpcan is present in the system.
   368 if libpcan is present in the system.
   375 
   369 
   376 Please download driver at \href{http://www.peak-system.com/linux}{http://www.peak
   370 Please download driver at \href{http://www.peak-system.com/linux}{http://www.peak
   377 -system.com/linux} and follow instructions in order to install driver
   371 -system.com/linux} and follow instructions in order to install driver
   378 on your system.
   372 on your system.
   379 
   373 
   380 
   374 \paragraph{Socket-Can (http://socketcan.berlios.de)}
   381 \paragraph{Socket -Can (http://socketcan.berlios.de)}
       
   382 
       
   383 
       
   384 \begin{verbatim}
   375 \begin{verbatim}
   385 	./configure --can=socket
   376 	./configure --can=socket
   386 \end{verbatim}
   377 \end{verbatim}
   387 
   378 
   388 \paragraph{Serial}
   379 \paragraph{Serial}
   389 
       
   390 
       
   391 \begin{verbatim}
   380 \begin{verbatim}
   392 	./configure --can=serial
   381 	./configure --can=serial
   393 \end{verbatim}
   382 \end{verbatim}
   394 
       
   395 The CAN serial driver implements a 1:1 serial connection between 2 CAN devices.
   383 The CAN serial driver implements a 1:1 serial connection between 2 CAN devices.
   396 For example, you can connect 2 CANFestival applications via a NULL modem cable.
   384 For example, you can connect 2 CANFestival applications via a NULL modem cable.
   397 
   385 
   398 Also with this driver comes a software hub, for up to 16 CANFestival apps to 
   386 Also with this driver comes a software hub, for up to 16 CANFestival apps to 
   399 be connected on a single PC, with an optional connection to another CAN driver.
   387 be connected on a single PC, with an optional connection to another CAN driver.
   400 Note that only the serial driver is supported at this time.  The hub uses ptys 
   388 Note that only the serial driver is supported at this time.  The hub uses ptys 
   401 (pseudo ttys) available on a *nix like system.
   389 (pseudo ttys) available on a *nix like system.
   402 
   390 
   403 
       
   404 \paragraph{LinCan}
   391 \paragraph{LinCan}
   405 
       
   406 
       
   407 \begin{verbatim}
   392 \begin{verbatim}
   408 	./configure --can=lincan
   393 	./configure --can=lincan
   409 \end{verbatim}
   394 \end{verbatim}
   410 
   395 
   411 
       
   412 \paragraph{Virtual CAN interfaces (for test/debug)}
   396 \paragraph{Virtual CAN interfaces (for test/debug)}
   413 
       
   414 
       
   415 \begin{verbatim}
   397 \begin{verbatim}
   416 	./configure --can=virtual
   398 	./configure --can=virtual
   417 		or, for kernel space:
   399 		or, for kernel space:
   418 	./configure --can=kernel_virtual
   400 	./configure --can=kernel_virtual
   419 \end{verbatim}
   401 \end{verbatim}
   420 
       
   421 
       
   422 Virtual CAN interface use Unix pipes to emulate a virtual CAN network.
   402 Virtual CAN interface use Unix pipes to emulate a virtual CAN network.
   423 Each message issued from a node is repeat to all other nodes. Currently
   403 Each message issued from a node is repeat to all other nodes. Currently
   424 only works with nodes running in the same process, and does not support
   404 only works with nodes running in the same process, and does not support
   425 work with Xenomai or Rtai.
   405 work with Xenomai or RTAI.
   426 
   406 
   427 
   407 \paragraph{VScom}
       
   408 \begin{verbatim}
       
   409 	./configure --can=vscom
       
   410 \end{verbatim}
       
   411 The VSCAN API archive will be automatically downloaded and decompressed (unzip required). See \href{http://www.vscom.de/1_1_05.htm}{www.vscom.de} for available adapters.
   428 \subsection{Testing your CanFestival installation}
   412 \subsection{Testing your CanFestival installation}
   429 
   413 
   430 \subsection{User space}
   414 \subsection{User space}
   431 
   415 
   432 Sample provided in /example/TestMasterSlave is installed into your
   416 Sample provided in /example/TestMasterSlave is installed into your