doc/manual/en/manual.tex
changeset 282 6afe145df950
parent 249 d328d0d9b88e
child 284 24bf3d692993
equal deleted inserted replaced
281:685d9a26e4f9 282:6afe145df950
   652 directory, and run the test program:
   652 directory, and run the test program:
   653 
   653 
   654 {\ttfamily
   654 {\ttfamily
   655 TestMasterSlave.exe {}-l can\_peak\_win32.dll}
   655 TestMasterSlave.exe {}-l can\_peak\_win32.dll}
   656 
   656 
       
   657 \subsection{MSYS}
       
   658 
       
   659 
       
   660 \subsubsection{Requirements}
       
   661 
       
   662 Download from : http://sourceforge.net/project/showfiles.php?group\_id=2435
       
   663 
       
   664 \begin{enumerate}
       
   665 \item MSYS-1.0.10.exe
       
   666 \item MinGW-5.1.3.exe
       
   667 \item mingwPORT (which contains wget-1.9.1)
       
   668 \end{enumerate}
       
   669 Please download driver at http://www.peak-system.com/themen/download\_gb.html
       
   670 and follow instructions in order to install driver on your system.
       
   671 Install MSYS and MingW as required, and the driver for your Peak CAN
       
   672 device. Open a MSYS terminal, and follow those instructions:\\
       
   673 
       
   674 
       
   675 \begin{itemize}
       
   676 \item extract wget-1.9.1-mingwPORT.tar.bz2
       
   677 \item copy wget.exe in c:\textbackslash{}msys\textbackslash{}1.0\textbackslash{}bin\textbackslash{}
       
   678 \item start MSYS and check the file /etc/fstab contain the line c:/MinGW
       
   679 /mingw
       
   680 \end{itemize}
       
   681 
       
   682 \subsubsection{MSYS configuration and compilation}
       
   683 
       
   684 Instructions for compilation are nearly the same as CYGWIN part. 
       
   685 
       
   686 
       
   687 \paragraph{A single node with PcanLight and Peak CAN-USB adapter}
       
   688 
       
   689 Download the PCAN-Light Zip file for your HW ( URL from download page
       
   690 ):
       
   691 
       
   692 \texttt{wget http://www.peak-system.com/files/usb.zip}~\\
       
   693 
       
   694 
       
   695 Extract its content into your MSYS's home (it will create a \char`\"{}Disk\char`\"{}
       
   696 directory):
       
   697 
       
   698 \texttt{unzip usb.zip}~\\
       
   699 
       
   700 
       
   701 Configure CanFestival3 providing path to the desired PcanLight implementation:
       
   702 
       
   703 \texttt{cd CanFestival-3}
       
   704 
       
   705 \texttt{export PCAN\_INCLUDE=\~{ }/Disk/PCAN-Light/Api/}
       
   706 
       
   707 \texttt{export PCAN\_HEADER=Pcan\_usb.h}
       
   708 
       
   709 \texttt{export PCAN\_LIB=\~{ }/Disk/PCAN-Light/Lib/Visual\textbackslash{}
       
   710 C++/Pcan\_usb.lib}
       
   711 
       
   712 \texttt{./configure -{}-can=peak\_win32}
       
   713 
       
   714 \texttt{make}~\\
       
   715 
       
   716 
       
   717 In order to test, you have to use another CanFestival node, connect
       
   718 with a CAN cable.
       
   719 
       
   720 \texttt{cp \~{ }/Disk/PCAN-Light/Pcan\_usb.dll .}
       
   721 
       
   722 \texttt{./examples/TestMasterSlave/TestMasterSlave \textbackslash{}}
       
   723 
       
   724 \texttt{-l drivers/can\_peak\_win32/cygcan\_peak\_win32.dll \textbackslash{}}
       
   725 
       
   726 \texttt{-S 500K -M none}~\\
       
   727 
       
   728 
       
   729 Then, on the other node :
       
   730 
       
   731 \texttt{./TestMasterSlave -l my\_driver.so -S none -M 500K -m 0}
       
   732 
       
   733 Now messages are beeing exchanged between master and slave node.
       
   734 
       
   735 
       
   736 \paragraph{Two nodes with PcanLight and Peak dual PCMCIA-CAN adapter}
       
   737 
       
   738 Download the PCAN-Light Zip file for your HW ( URL from download page
       
   739 ):
       
   740 
       
   741 \texttt{wget http://www.peak-system.com/files/pccard.zip}~\\
       
   742 \\
       
   743 Extract its content into your MSYS's home (it will create a \char`\"{}Disk\char`\"{}
       
   744 directory):
       
   745 
       
   746 \texttt{unzip pccard.zip}~\\
       
   747 \\
       
   748 The configure CanFestival3 providing path to the desired PcanLight
       
   749 implementation:\\
       
   750 
       
   751 
       
   752 \texttt{export PCAN\_INCLUDE=\~{ }/Disk/PCAN-Light/Api/}
       
   753 
       
   754 \texttt{export PCAN\_HEADER=Pcan\_pcc.h}
       
   755 
       
   756 \texttt{export PCAN\_LIB=\~{ }/Disk/PCAN-Light/Lib/Visual\textbackslash{}
       
   757 C++/Pcan\_pcc.lib}
       
   758 
       
   759 \texttt{export PCAN2\_HEADER=Pcan\_2pcc.h}
       
   760 
       
   761 \texttt{export PCAN2\_LIB=\~{ }/Disk/PCAN-Light/Lib/Visual\textbackslash{}
       
   762 C++/Pcan\_2pcc.lib}~\\
       
   763 
       
   764 
       
   765 In order to test, just connect together both CAN ports of the PCMCIA
       
   766 card. Don't forget 120ohms terminator.
       
   767 
       
   768 \texttt{cp\~{ }/Disk/PCAN-Light/Pcan\_pcc.dll ~.}
       
   769 
       
   770 \texttt{cp \~{ }/Disk/PCAN-Light/Pcan\_2pcc.dll ~.}
       
   771 
       
   772 \texttt{./examples/TestMasterSlave/TestMasterSlave \textbackslash{}}
       
   773 
       
   774 \texttt{-l drivers/can\_peak\_win32/cygcan\_peak\_win32.dll -m 0 -s
       
   775 1}~\\
       
   776 
       
   777 
       
   778 Messages are then exchanged between master and slave node, both inside
       
   779 TestMasterSlave's process.
       
   780 
   657 \section{Motorola HCS12}
   781 \section{Motorola HCS12}
   658 The examples have been tested on a MC9S12DG255 mounted on a
   782 The examples have been tested on a MC9S12DG255 mounted on a
   659 Elektronikladen HCS12 T{}-board.
   783 Elektronikladen HCS12 T{}-board.
   660 
   784 
   661 Beware that there are a few differences in the MSCAN module of the
   785 Beware that there are a few differences in the MSCAN module of the