From: razvanm Date: Thu, 26 Jun 2008 18:30:21 +0000 (+0000) Subject: Address Vlado's comments and improve the GoldenImage's README. X-Git-Tag: release_tinyos_2_1_0_0~153 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=c3a5b21b38cd9dbce0d1d89513ba97f98bfb2766 Address Vlado's comments and improve the GoldenImage's README. --- diff --git a/apps/tests/deluge/Blink/BlinkAppC.nc b/apps/tests/deluge/Blink/BlinkAppC.nc index 1a09d0ff..2189ce46 100644 --- a/apps/tests/deluge/Blink/BlinkAppC.nc +++ b/apps/tests/deluge/Blink/BlinkAppC.nc @@ -37,20 +37,17 @@ * @author Razvan Musaloiu-E. **/ -configuration BlinkAppC -{ -} +configuration BlinkAppC { } + implementation { components MainC, BlinkC, LedsC; -#ifdef DELUGE + components new TimerMilliC() as Timer0; components DelugeC; + DelugeC.Leds -> LedsC; -#endif - components new TimerMilliC() as Timer0; BlinkC -> MainC.Boot; - BlinkC.Timer0 -> Timer0; BlinkC.Leds -> LedsC; } diff --git a/apps/tests/deluge/GoldenImage/GoldenImageAppC.nc b/apps/tests/deluge/GoldenImage/GoldenImageAppC.nc new file mode 100644 index 00000000..f27635f4 --- /dev/null +++ b/apps/tests/deluge/GoldenImage/GoldenImageAppC.nc @@ -0,0 +1,33 @@ +/* Copyright (c) 2007 Johns Hopkins University. +* All rights reserved. +* +* Permission to use, copy, modify, and distribute this software and its +* documentation for any purpose, without fee, and without written +* agreement is hereby granted, provided that the above copyright +* notice, the (updated) modification history and the author appear in +* all copies of this source code. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOSS OF USE, DATA, +* OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +* THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * @author Chieh-Jan Mike Liang + * @author Razvan Musaloiu-E. + */ + +configuration GoldenImageAppC {} + +implementation +{ + components DelugeC; +} + diff --git a/apps/tests/deluge/GoldenImage/GoldenImageC.nc b/apps/tests/deluge/GoldenImage/GoldenImageC.nc deleted file mode 100644 index d99c2c9c..00000000 --- a/apps/tests/deluge/GoldenImage/GoldenImageC.nc +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2007 Johns Hopkins University. -* All rights reserved. -* -* Permission to use, copy, modify, and distribute this software and its -* documentation for any purpose, without fee, and without written -* agreement is hereby granted, provided that the above copyright -* notice, the (updated) modification history and the author appear in -* all copies of this source code. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' -* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS -* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOSS OF USE, DATA, -* OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -* THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/** - * @author Chieh-Jan Mike Liang - * @author Razvan Musaloiu-E. - */ - -configuration GoldenImageC {} - -implementation -{ - components DelugeC; -} - diff --git a/apps/tests/deluge/GoldenImage/Makefile b/apps/tests/deluge/GoldenImage/Makefile index cbdea503..caf65c10 100644 --- a/apps/tests/deluge/GoldenImage/Makefile +++ b/apps/tests/deluge/GoldenImage/Makefile @@ -1,6 +1,7 @@ -COMPONENT=GoldenImageC +COMPONENT=GoldenImageAppC BOOTLOADER=tosboot -CFLAGS += -DDELUGE_BASESTATION +#CFLAGS += -DDELUGE_BASESTATION +#CFLAGS += -DDELUGE_LIGHT_BASESTATION include $(MAKERULES) diff --git a/apps/tests/deluge/GoldenImage/README.txt b/apps/tests/deluge/GoldenImage/README.txt index 39dd3f59..b3e140ea 100644 --- a/apps/tests/deluge/GoldenImage/README.txt +++ b/apps/tests/deluge/GoldenImage/README.txt @@ -9,19 +9,10 @@ Description: This is a sample application for Deluge T2. The application is similar to Null, but it includes Deluge T2. -You can reprogram the whole network (non-basestation motes) by first -uploading the image to the base station. Then, tell the base station to -disseminate the image. Example: - - tos-deluge /dev/ttyUSB0 telosb -d 0 - -Finally, after the image has been disseminated, instruct the base -station to disseminate the command to reprogram. Example: - - tos-deluge /dev/ttyUSB0 telosb -r 0 - -For a more detailed discussion on Deluge T2, please refer to the Deluge -T2 manual. +To program a basestation (a mote which can accept images over the +serial port) you have to add CFLAGS=-DDELUGE_BASESTATION to the make +command. For telosb this might look like this: + CFLAGS=-DDELUGE_BASESTATION make telosb install bsl,/dev/ttyUSB0 Prerequisites: