X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=apps%2Ftests%2Fdeluge%2FBlink%2Fburn;h=6c67b9f1c6901fc8ffeacd1577e2f31f418f9665;hb=ff6f444a38d8901cbf9fd5f844639f3a5c5be597;hp=1418e38229ece16570862c88e1008bb1b01f1f84;hpb=1275ad8c5c9368b541e7eeccfeb6bf20352e6330;p=tinyos-2.x.git diff --git a/apps/tests/deluge/Blink/burn b/apps/tests/deluge/Blink/burn index 1418e382..6c67b9f1 100755 --- a/apps/tests/deluge/Blink/burn +++ b/apps/tests/deluge/Blink/burn @@ -1,5 +1,12 @@ #!/bin/bash +TOS_DELUGE=`type -p tos-deluge` +if [[ ! -x ${TOS_DELUGE} ]] ; then + TOS_DELUGE=../../../../tools/tinyos/misc/tos-deluge +fi + +echo ${TOS_DELUGE} + if [ $# -ne 2 ]; then echo "Usage: $0 " echo " For example, /dev/ttyUSB0" @@ -17,20 +24,43 @@ PLATFORM=$2 make clean -echo ==================== Compile and load Blink ==================== +echo ============================ Compile and load Blink ============================ if [ $PLATFORM == 'micaz' ] then - CFLAGS=-DDELUGE_BASESTATION make $PLATFORM install mib510,$PORT + CFLAGS=-DDELUGE_BASESTATION make ${PLATFORM} install mib510,${PORT} elif [ $PLATFORM == 'telosb' ] then - CFLAGS=-DDELUGE_BASESTATION make $PLATFORM install bsl,$PORT + CFLAGS=-DDELUGE_BASESTATION make ${PLATFORM} install bsl,${PORT} fi -echo ==================== Compile a new Blink ==================== -CFLAGS=-DBLINK_REVERSE\ -DDELUGE_BASESTATION make $PLATFORM +echo ' +-------------------------------------------------------+' +echo ' | |' +echo ' | At this point the first led (red) should be blinking. |' +echo ' | |' +echo ' | Press ENTER to continue... |' +echo ' | |' +echo ' +-------------------------------------------------------+' +read + +echo ============================= Compile a new Blink ============================== +CFLAGS=-DBLINK_REVERSE\ -DDELUGE_BASESTATION make ${PLATFORM} + +echo =============================== Upload the image =============================== +${TOS_DELUGE} ${PORT} ${PLATFORM} -i 0 build/${PLATFORM}/tos_image.xml -echo ==================== Upload the image ==================== -../../../../tools/tinyos/misc/tos-deluge $PORT $PLATFORM -i 0 build/$PLATFORM/tos_image.xml +echo ' +----------------------------------------------------------------+' +echo ' | |' +echo ' | After pressing enter the following things will take place: |' +echo ' | - mote will be rebooted |' +echo ' | - all the leds will blink for some time as the |' +echo ' | reprogramming by tosboot takes place. |' +echo ' | - a fading of the leds will indicate the exiting from tosboot. |' +echo ' | - the mote should start blinking the 3rd led (blue/yellow). |' +echo ' | |' +echo ' | Press ENTER to continue... |' +echo ' | |' +echo ' +----------------------------------------------------------------+' +read -echo ==================== Reboot ==================== -../../../../tools/tinyos/misc/tos-deluge $PORT $PLATFORM -r 0 +echo =========================== Reboot the base station ============================ +${TOS_DELUGE} ${PORT} ${PLATFORM} -b 0