configure
changeset 694 8dd1e58b3815
parent 674 352c42b20441
child 698 a0b50d6ce746
equal deleted inserted replaced
692:6818cc935ab1 694:8dd1e58b3815
    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 transfer.
    32 #For a normal transfert, (usually for a string), put the maximum string size to transfer.
    32 #For a normal transfer, (usually for a string), put the maximum string size to transfer.
    33 SDO_MAX_LENGTH_TRANSFERT=32
    33 SDO_MAX_LENGTH_TRANSFER=32
    34 
    34 
    35 # For block transfert, number of segments transmitted at once.
    35 # For block transfer, number of segments transmitted at once.
    36 # SDO_BLOCK_SIZE CAN frames must fit into the CAN Tx buffer
    36 # SDO_BLOCK_SIZE CAN frames must fit into the CAN Tx buffer
    37 SDO_BLOCK_SIZE=16
    37 SDO_BLOCK_SIZE=16
    38 
    38 
    39 # Number of SDO from differents nodes that the node can manage concurrently.
    39 # Number of SDO from differents nodes that the node can manage concurrently.
    40 #for a slave node, usually put 1.
    40 #for a slave node, usually put 1.
    41 SDO_MAX_SIMULTANEOUS_TRANSFERTS=4
    41 SDO_MAX_SIMULTANEOUS_TRANSFERS=4
    42 
    42 
    43 # Used for NMTable[bus][nodeId]
    43 # Used for NMTable[bus][nodeId]
    44 # You can put less of 128 if on the netwo
    44 # You can put less of 128 if on the netwo
    45 # are connected only smaller nodeId node.
    45 # are connected only smaller nodeId node.
    46 NMT_MAX_NODE_ID=128
    46 NMT_MAX_NODE_ID=128
   123 			echo "On user request: LSS services enabled";;
   123 			echo "On user request: LSS services enabled";;
   124 	--enable-lss-fs)	ENABLE_LSS_FS=1;
   124 	--enable-lss-fs)	ENABLE_LSS_FS=1;
   125 			echo "On user request: LSS FastScan service enabled";;
   125 			echo "On user request: LSS FastScan service enabled";;
   126 	--debug=*)	DEBUG=$optarg;;
   126 	--debug=*)	DEBUG=$optarg;;
   127 	--MAX_CAN_BUS_ID=*)	MAX_CAN_BUS_ID=$optarg;;
   127 	--MAX_CAN_BUS_ID=*)	MAX_CAN_BUS_ID=$optarg;;
   128 	--SDO_MAX_LENGTH_TRANSFERT=*)	SDO_MAX_LENGTH_TRANSFERT=$optarg;;
   128 	--SDO_MAX_LENGTH_TRANSFER=*)	SDO_MAX_LENGTH_TRANSFER=$optarg;;
   129 	--SDO_BLOCK_SIZE=*)	SDO_BLOCK_SIZE=$optarg;;
   129 	--SDO_BLOCK_SIZE=*)	SDO_BLOCK_SIZE=$optarg;;
   130 	--SDO_MAX_SIMULTANEOUS_TRANSFERTS=*)	SDO_MAX_SIMULTANEOUS_TRANSFERTS=$optarg;;
   130 	--SDO_MAX_SIMULTANEOUS_TRANSFERS=*)	SDO_MAX_SIMULTANEOUS_TRANSFERS=$optarg;;
   131 	--NMT_MAX_NODE_ID=*)	NMT_MAX_NODE_ID=$optarg;;
   131 	--NMT_MAX_NODE_ID=*)	NMT_MAX_NODE_ID=$optarg;;
   132 	--SDO_TIMEOUT_MS=*)	SDO_TIMEOUT_MS=$optarg;;
   132 	--SDO_TIMEOUT_MS=*)	SDO_TIMEOUT_MS=$optarg;;
   133 	--CANOPEN_BIG_ENDIAN=*)	CANOPEN_BIG_ENDIAN=$optarg;;
   133 	--CANOPEN_BIG_ENDIAN=*)	CANOPEN_BIG_ENDIAN=$optarg;;
   134 	--MAX_NB_TIMER=*) MAX_NB_TIMER=$optarg;;
   134 	--MAX_NB_TIMER=*) MAX_NB_TIMER=$optarg;;
   135 	--EMCY_MAX_ERRORS=*) EMCY_MAX_ERRORS=$optarg;;
   135 	--EMCY_MAX_ERRORS=*) EMCY_MAX_ERRORS=$optarg;;
   181 		echo	"               \"WAR\" print errors and warnings, to stdout"
   181 		echo	"               \"WAR\" print errors and warnings, to stdout"
   182 		echo	"               \"MSG\" print messages content, to stdout"
   182 		echo	"               \"MSG\" print messages content, to stdout"
   183 		echo
   183 		echo
   184 		echo	"Stack compilation constants"
   184 		echo	"Stack compilation constants"
   185 		echo	" --MAX_CAN_BUS_ID [=1] Number of can bus to use"
   185 		echo	" --MAX_CAN_BUS_ID [=1] Number of can bus to use"
   186 		echo	" --SDO_MAX_LENGTH_TRANSFERT [=32] max bytes to transmit by SDO"
   186 		echo	" --SDO_MAX_LENGTH_TRANSFER [=32] max bytes to transmit by SDO"
   187 		echo	" --SDO_BLOCK_SIZE [=16] max CAN frames transmitted at once for block transfert"
   187 		echo	" --SDO_BLOCK_SIZE [=16] max CAN frames transmitted at once for block transfer"
   188 		echo	" --SDO_MAX_SIMULTANEOUS_TRANSFERTS [=4] Number of SDO that the node can manage concurrently"
   188 		echo	" --SDO_MAX_SIMULTANEOUS_TRANSFERS [=4] Number of SDO that the node can manage concurrently"
   189 		echo	" --NMT_MAX_NODE_ID [=128] can be reduced to gain memory on small network"
   189 		echo	" --NMT_MAX_NODE_ID [=128] can be reduced to gain memory on small network"
   190 		echo	" --SDO_TIMEOUT_MS [=3000] Timeout in milliseconds for SDO (None to disable the feature)"
   190 		echo	" --SDO_TIMEOUT_MS [=3000] Timeout in milliseconds for SDO (None to disable the feature)"
   191 		echo	" --EMCY_MAX_ERRORS [=8] Max number of active errors managed in error_data structure"
   191 		echo	" --EMCY_MAX_ERRORS [=8] Max number of active errors managed in error_data structure"
   192 		echo	" --LSS_TIMEOUT_MS [=1000] Timeout in milliseconds for LSS services."
   192 		echo	" --LSS_TIMEOUT_MS [=1000] Timeout in milliseconds for LSS services."
   193 		echo	"                          LSS must be enabled with \"--enable-lss\""
   193 		echo	"                          LSS must be enabled with \"--enable-lss\""
   670 echo "#ifndef _CONFIG_H_" >> include/config.h
   670 echo "#ifndef _CONFIG_H_" >> include/config.h
   671 echo "#define _CONFIG_H_" >> include/config.h
   671 echo "#define _CONFIG_H_" >> include/config.h
   672 echo "" >> include/config.h
   672 echo "" >> include/config.h
   673 for i in \
   673 for i in \
   674  MAX_CAN_BUS_ID\
   674  MAX_CAN_BUS_ID\
   675  SDO_MAX_LENGTH_TRANSFERT\
   675  SDO_MAX_LENGTH_TRANSFER\
   676  SDO_BLOCK_SIZE\
   676  SDO_BLOCK_SIZE\
   677  SDO_MAX_SIMULTANEOUS_TRANSFERTS\
   677  SDO_MAX_SIMULTANEOUS_TRANSFERS\
   678  NMT_MAX_NODE_ID\
   678  NMT_MAX_NODE_ID\
   679  SDO_TIMEOUT_MS\
   679  SDO_TIMEOUT_MS\
   680  MAX_NB_TIMER\
   680  MAX_NB_TIMER\
   681  CANOPEN_BIG_ENDIAN\
   681  CANOPEN_BIG_ENDIAN\
   682  US_TO_TIMEVAL_FACTOR\
   682  US_TO_TIMEVAL_FACTOR\
   693 fi
   693 fi
   694 done
   694 done
   695 echo "" >> include/config.h
   695 echo "" >> include/config.h
   696 
   696 
   697 for i in \
   697 for i in \
   698  SDO_MAX_SIMULTANEOUS_TRANSFERTS\
   698  SDO_MAX_SIMULTANEOUS_TRANSFERS\
   699  NMT_MAX_NODE_ID\
   699  NMT_MAX_NODE_ID\
   700  EMCY_MAX_ERRORS; do
   700  EMCY_MAX_ERRORS; do
   701 	echo "#define REPEAT_"$i"_TIMES(repeat)\\">> include/config.h
   701 	echo "#define REPEAT_"$i"_TIMES(repeat)\\">> include/config.h
   702 	times=${!i}
   702 	times=${!i}
   703 	result=""
   703 	result=""