From: regehr Date: Thu, 3 Jul 2008 18:41:36 +0000 (+0000) Subject: document this app a bit X-Git-Tag: release_tinyos_2_1_0_0~111 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=91d290ec429b4c2da397de916e9b4103db9c6a5b document this app a bit --- diff --git a/apps/tutorials/BlinkFail/BlinkFailAppC.nc b/apps/tutorials/BlinkFail/BlinkFailAppC.nc index 9cd663e3..5bad2248 100644 --- a/apps/tutorials/BlinkFail/BlinkFailAppC.nc +++ b/apps/tutorials/BlinkFail/BlinkFailAppC.nc @@ -30,9 +30,9 @@ */ /** - * Blink is a basic application that toggles the a mote LED periodically. - * It does so by starting a Timer that fires every second. It uses the - * OSKI TimerMilli service to achieve this goal. + * BlinkFail is a basic application that toggles the a mote LED periodically and + * then accesses out of bounds storage as a demonstration and sanity check for + * Safe TinyOS. * * @author tinyos-help@millennium.berkeley.edu **/ diff --git a/apps/tutorials/BlinkFail/BlinkFailC.nc b/apps/tutorials/BlinkFail/BlinkFailC.nc index 76ea293d..e27d221a 100644 --- a/apps/tutorials/BlinkFail/BlinkFailC.nc +++ b/apps/tutorials/BlinkFail/BlinkFailC.nc @@ -30,8 +30,8 @@ */ /** - * Implementation for Blink application. Toggle the red LED when a - * Timer fires. + * Implementation for BlinkFail application. Toggle the LEDs when a + * Timer fires. Access out of bounds storage after a few seconds. **/ #include "Timer.h" @@ -66,6 +66,7 @@ implementation { dbg("BlinkFailC", "Timer 1 fired @ %s \n", sim_time_string()); call Leds.led1Toggle(); + // here we violate memory safety on the 11th signal of this event a[i++] = 1; } diff --git a/apps/tutorials/BlinkFail/README.txt b/apps/tutorials/BlinkFail/README.txt index 3696539e..88e1c098 100644 --- a/apps/tutorials/BlinkFail/README.txt +++ b/apps/tutorials/BlinkFail/README.txt @@ -3,14 +3,21 @@ Author/Contact: tinyos-help@millennium.berkeley.edu Description: +BlinkFail is based on Blink (described below). It is designed to +violate memory safety after a few seconds and is used as a +demonstration and sanity check for Safe TinyOS. For more information +about Safe TinyOS see here: + + http://www.cs.utah.edu/~coop/safetinyos/ + Blink is a simple application that blinks the 3 mote LEDs. It tests that the boot sequence and millisecond timers are working properly. The three LEDs blink at 1Hz, 2Hz, and 4Hz. Because each is driven by -an independent timer, visual inspection can determine whether there are -bugs in the timer system that are causing drift. Note that this +an independent timer, visual inspection can determine whether there +are bugs in the timer system that are causing drift. Note that this method is different than RadioCountToLeds, which fires a single timer -at a steady rate and uses the bottom three bits of a counter to display -on the LEDs. +at a steady rate and uses the bottom three bits of a counter to +display on the LEDs. Tools: