99 --timers=*) SUB_TIMERS_DRIVER=$optarg;; |
99 --timers=*) SUB_TIMERS_DRIVER=$optarg;; |
100 --disable-Ox) DISABLE_OPT=1; |
100 --disable-Ox) DISABLE_OPT=1; |
101 echo "On user request: Won't optimize with \"-Ox\"";; |
101 echo "On user request: Won't optimize with \"-Ox\"";; |
102 --disable-dll) DISABLE_DLL=1; |
102 --disable-dll) DISABLE_DLL=1; |
103 echo "On user request: Won't create and link to dll";; |
103 echo "On user request: Won't create and link to dll";; |
104 --debug) DEBUG=1; |
104 --debug=*) DEBUG=$optarg;; |
105 echo "Debug messages enabled !!";; |
|
106 --debugPDO) DEBUG=PDO; |
|
107 echo "Debug messages (PDO) enabled !!";; |
|
108 --MAX_CAN_BUS_ID=*) MAX_CAN_BUS_ID=$1;; |
105 --MAX_CAN_BUS_ID=*) MAX_CAN_BUS_ID=$1;; |
109 --SDO_MAX_LENGTH_TRANSFERT=*) SDO_MAX_LENGTH_TRANSFERT=$1;; |
106 --SDO_MAX_LENGTH_TRANSFERT=*) SDO_MAX_LENGTH_TRANSFERT=$1;; |
110 --SDO_MAX_SIMULTANEOUS_TRANSFERTS=*) SDO_MAX_SIMULTANEOUS_TRANSFERTS=$1;; |
107 --SDO_MAX_SIMULTANEOUS_TRANSFERTS=*) SDO_MAX_SIMULTANEOUS_TRANSFERTS=$1;; |
111 --NMT_MAX_NODE_ID=*) NMT_MAX_NODE_ID=$1;; |
108 --NMT_MAX_NODE_ID=*) NMT_MAX_NODE_ID=$1;; |
112 --SDO_TIMEOUT_MS=*) SDO_TIMEOUT_MS=$1;; |
109 --SDO_TIMEOUT_MS=*) SDO_TIMEOUT_MS=$1;; |
135 echo " \"lincan\" for HCS12 micro-controller" |
132 echo " \"lincan\" for HCS12 micro-controller" |
136 echo " please see http://www.ocera.org/download/components/WP7/lincan-0.3.3.html" |
133 echo " please see http://www.ocera.org/download/components/WP7/lincan-0.3.3.html" |
137 echo " --timers=foo Use 'foo' as TIMERS driver (can be either 'unix' or 'xeno')" |
134 echo " --timers=foo Use 'foo' as TIMERS driver (can be either 'unix' or 'xeno')" |
138 echo " --disable-dll Disable run-time dynamic linking of can, led and nvram drivers" |
135 echo " --disable-dll Disable run-time dynamic linking of can, led and nvram drivers" |
139 echo " --disable-Ox Disable gcc \"-Ox\" optimizations." |
136 echo " --disable-Ox Disable gcc \"-Ox\" optimizations." |
140 echo " --debug Enable debug messages." |
137 echo " --debug=foo Enable debug messages, ERR -> only errors, WAR)." |
141 echo " --debugPDO Enable debug messages, using PDO." |
138 echo " \"PDO\" send errors and warnings through PDO messages" |
|
139 echo " \"ERR\" errors only, to stdout" |
|
140 echo " \"WAR\" errors and warnings, to stdout" |
142 echo |
141 echo |
143 echo "Stack compilation constants" |
142 echo "Stack compilation constants" |
144 echo " --MAX_CAN_BUS_ID [=1] Number of can bus to use" |
143 echo " --MAX_CAN_BUS_ID [=1] Number of can bus to use" |
145 echo " --SDO_MAX_LENGTH_TRANSFERT [=32] max bytes to transmit by SDO" |
144 echo " --SDO_MAX_LENGTH_TRANSFERT [=32] max bytes to transmit by SDO" |
146 echo " --SDO_MAX_SIMULTANEOUS_TRANSFERTS [=4] Number of SDO that the node can manage concurrently" |
145 echo " --SDO_MAX_SIMULTANEOUS_TRANSFERTS [=4] Number of SDO that the node can manage concurrently" |
591 echo "#endif /* _CONFIG_H_ */" >> include/config.h |
590 echo "#endif /* _CONFIG_H_ */" >> include/config.h |
592 |
591 |
593 ########################################################################### |
592 ########################################################################### |
594 # DEBUG DEFINES/CFLAGS # |
593 # DEBUG DEFINES/CFLAGS # |
595 ########################################################################### |
594 ########################################################################### |
596 if [ "$DEBUG" != "" ]; then |
595 if [ "$DEBUG" = "WAR" ]; then |
597 SUB_PROG_CFLAGS=$SUB_PROG_CFLAGS\ -DDEBUG_CAN\ -DDEBUG_WAR_CONSOLE_ON\ -DDEBUG_ERR_CONSOLE_ON\ -g |
596 SUB_PROG_CFLAGS=$SUB_PROG_CFLAGS\ -DDEBUG_WAR_CONSOLE_ON\ -DDEBUG_ERR_CONSOLE_ON\ -g |
|
597 fi |
|
598 |
|
599 if [ "$DEBUG" = "ERR" ]; then |
|
600 SUB_PROG_CFLAGS=$SUB_PROG_CFLAGS\ -DDEBUG_ERR_CONSOLE_ON\ -g |
598 fi |
601 fi |
599 |
602 |
600 if [ "$DEBUG" = "PDO" ]; then |
603 if [ "$DEBUG" = "PDO" ]; then |
601 SUB_PROG_CFLAGS=$SUB_PROG_CFLAGS\ -DPDO_ERROR |
604 SUB_PROG_CFLAGS=$SUB_PROG_CFLAGS\ -DDEBUG_WAR_CONSOLE_ON\ -DDEBUG_ERR_CONSOLE_ON\ -g\ -DPDO_ERROR |
602 fi |
605 fi |
603 |
606 |
604 if [ "$DISABLE_OPT" = "1" ]; then |
607 if [ "$DISABLE_OPT" = "1" ]; then |
605 SUB_OPT_CFLAGS= |
608 SUB_OPT_CFLAGS= |
606 else |
609 else |