*/
/**
- * 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
**/
*/
/**
- * 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"
{
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;
}
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: