configure
changeset 267 96c688ebcde7
parent 246 d635cfc520ee
child 275 7d5130f2f8ab
equal deleted inserted replaced
266:8678a3cf7fe7 267:96c688ebcde7
     1 #!/bin/bash
     1 #!/bin/sh
     2 
     2 
     3 #
     3 #
     4 # Copyright (C) 2004 Edouard TISSERRANT, Laurent BESSARD
     4 # Copyright (C) 2004 Edouard TISSERRANT, Laurent BESSARD
     5 # Based on Gabriel Gerhardsson's cacheprobe configure script. 
     5 # Based on Gabriel Gerhardsson's cacheprobe configure script. 
     6 # 
     6 # 
    24 ###########################################################################
    24 ###########################################################################
    25 #                       DEFAULT CANFESTIVAL DEFINES                       #
    25 #                       DEFAULT CANFESTIVAL DEFINES                       #
    26 ###########################################################################
    26 ###########################################################################
    27 
    27 
    28 # Number of can bus to use 
    28 # Number of can bus to use 
    29 MAX_CAN_BUS_ID=1 
    29 MAX_CAN_BUS_ID=1
    30 
    30 
    31 # max bytes to transmit by SDO Put 4 if you only support expedited transfert.
    31 # max bytes to transmit by SDO Put 4 if you only support expedited transfert.
    32 # For a normal transfert, (usually for a string), put the maximum string size to transfer.
    32 # For a normal transfert, (usually for a string), put the maximum string size to transfer.
    33 SDO_MAX_LENGTH_TRANSFERT=32 
    33 SDO_MAX_LENGTH_TRANSFERT=32
    34 
    34 
    35 # Number of SDO from differents nodes that the node can manage concurrently.   
    35 # Number of SDO from differents nodes that the node can manage concurrently.   
    36 # for a slave node, usually put 1.
    36 # for a slave node, usually put 1.
    37 SDO_MAX_SIMULTANEOUS_TRANSFERTS=4
    37 SDO_MAX_SIMULTANEOUS_TRANSFERTS=4
    38 
    38 
    39 # Used for NMTable[bus][nodeId]	  
    39 # Used for NMTable[bus][nodeId]	  
    40 # You can put less of 128 if on the netwo
    40 # You can put less of 128 if on the netwo
    41 # are connected only smaller nodeId node.
    41 # are connected only smaller nodeId node.
    42 NMT_MAX_NODE_ID=128  
    42 NMT_MAX_NODE_ID=128
    43 
    43 
    44 #Timeout in milliseconds for SDO.
    44 #Timeout in milliseconds for SDO.
    45 #    Comment the #define if not used (infinite wait for SDO response message)
    45 #    Comment the #define if not used (infinite wait for SDO response message)
    46 SDO_TIMEOUT_MS=3000
    46 SDO_TIMEOUT_MS=3000
    47 
    47 
   330 # If target not specified, try to gess one
   330 # If target not specified, try to gess one
   331 if [ "$SUB_TARGET" = "" ]; then
   331 if [ "$SUB_TARGET" = "" ]; then
   332 	if [ "$SUB_OS_NAME" = "CYGWIN" ]; then
   332 	if [ "$SUB_OS_NAME" = "CYGWIN" ]; then
   333 		echo "Choosing unix (cygwin) target"
   333 		echo "Choosing unix (cygwin) target"
   334 		SUB_TARGET=unix
   334 		SUB_TARGET=unix
   335 	else
   335 	fi
       
   336 	if [ "$SUB_OS_NAME" = "Linux" ]; then
   336 		echo "Choosing unix target"
   337 		echo "Choosing unix target"
   337 		SUB_TARGET=unix
   338 		SUB_TARGET=unix
       
   339 	fi
       
   340 	if [ "$SUB_OS_NAME" = "MINGW32" ]; then
       
   341 		echo "Choosing windows target"
       
   342 		SUB_TARGET=win32
   338 	fi
   343 	fi
   339 fi
   344 fi
   340 
   345 
   341 # Try to gess can
   346 # Try to gess can
   342 if [ "$SUB_CAN_DRIVER" = "" ]; then
   347 if [ "$SUB_CAN_DRIVER" = "" ]; then
   356 
   361 
   357 # If target is unix, default timers also
   362 # If target is unix, default timers also
   358 if [ "$SUB_TARGET" = "unix" -a "$SUB_TIMERS_DRIVER" = "" ]; then
   363 if [ "$SUB_TARGET" = "unix" -a "$SUB_TIMERS_DRIVER" = "" ]; then
   359 	echo "Choosing unix timers driver."
   364 	echo "Choosing unix timers driver."
   360 	SUB_TIMERS_DRIVER=unix
   365 	SUB_TIMERS_DRIVER=unix
       
   366 fi
       
   367 
       
   368 # If target is windows, default timers also
       
   369 if [ "$SUB_TARGET" = "win32" -a "$SUB_TIMERS_DRIVER" = "" ]; then
       
   370 	echo "Choosing windows timers driver."
       
   371 	SUB_TIMERS_DRIVER=win32
   361 fi
   372 fi
   362 
   373 
   363 # Warn for unstalled peak driver if choosen
   374 # Warn for unstalled peak driver if choosen
   364 if [ "$SUB_CAN_DRIVER" = "peak" ]; then
   375 if [ "$SUB_CAN_DRIVER" = "peak" ]; then
   365 	if [ ! -e /usr/lib/libpcan.so ]; then 
   376 	if [ ! -e /usr/lib/libpcan.so ]; then 
   660 if [ "$SUB_TARGET" = "unix" ]; then
   671 if [ "$SUB_TARGET" = "unix" ]; then
   661 	MAKEFILES=$MAKEFILES\
   672 	MAKEFILES=$MAKEFILES\
   662 \	examples/TestMasterMicroMod/Makefile.in
   673 \	examples/TestMasterMicroMod/Makefile.in
   663 fi
   674 fi
   664 
   675 
       
   676 if [ "$SUB_TARGET" = "win32" ]; then
       
   677 	MAKEFILES=$MAKEFILES\
       
   678 \	examples/TestMasterSlave/Makefile.in
       
   679 fi
       
   680 
       
   681 if [ "$SUB_TARGET" = "win32" ]; then
       
   682 	MAKEFILES=$MAKEFILES\
       
   683 \	examples/TestMasterMicroMod/Makefile.in
       
   684 fi
       
   685 
       
   686 
   665 if [ "$SUB_TARGET" = "hcs12" ]; then
   687 if [ "$SUB_TARGET" = "hcs12" ]; then
   666 	MAKEFILES=$MAKEFILES\
   688 	MAKEFILES=$MAKEFILES\
   667 \	examples/gene_SYNC_HCS12/Makefile.in
   689 \	examples/gene_SYNC_HCS12/Makefile.in
   668 fi
   690 fi
   669 
   691