Title: Message
Just uploaded some flash utilities and updates to TinyOS 1.x CVS under /contrib/rincon/.  We're using these in customer deployment applications on various platforms, and I'm sure they can help someone out on theirs.  You'll need to download the whole /contrib/rincon directory to have all the directories required to compile these:
 
 
FLASH BRIDGE
/contrib/rincon/tos/lib/FlashBridge - updated
FlashBridge, the component that provides generic platform neutral access to non-volatile medias, now supports internal non-volatile memory.  For some deployment applications, this provides the advantage of removing the external flash chip completely and relying only on the internal memory for any platform type.  FlashBridge supports the following media types:
 > AVR internal eeprom
 > MSP430 internal flash
 > STM25P80 tmote external flash
 > AT45DB mica2/z external flash
 
* The FlashBridge interface is still the same as before (read, write, erase, crc, flush).
 
* FlashModify is a new interface that allows you to modify bytes on non-volatile memory - this lets your application take advantage of the properties of EEPROM on the AVR's, and implements a read-modify-write scheme on the MSP430 internal flash.  The FlashModify interface is still behavior neutral, but not implemented on the ST M25P80 tmote external flash due to erase unit size.  This gets rid of the efficiency issues using FlashBridge on EEPROM's.
 
* FlashSettings is a new interface that allows you to extract information about the memory your app is executing on, including write unit size, number of write units, erase unit size, number of erase units, log2 write unit size, log2 erase unit size, flash size, fill byte definition, etc. (TEP 103 developers should take a look at this).
 
FlashBridgeViewer, FlashModifyViewer, and MediaFormat utilities are provided in /tos/lib/FlashBridge/apps
 
 
 
CONFIGURATION STORAGE
/contrib/rincon/tos/lib/Configuration
The configuration component rests on top of the FlashBridge component to store structs, buffers, variables, etc. from your application to non-volatile memory - typically internal microcontroller memory, although it also works on the external mica at45db memory. 
 
What this means is you can have components in your application load() and store() its own local settings to any microcontroller flash/eeprom, without worrying about where the data should be located, how big the data is, whether or not it's valid, how to use the microcontroller memory, etc. 
 
The interface is very straightforward.  There is a demo available in the /tos/lib/Configuration/apps directory that keeps track of the number of times the mote has rebooted. 
 
Any application that has a relatively small amount of configuration data to be stored in non-volatile memory should consider using this.  Some applications include maintaining security parameters, neighbor tables, frame counts, random number seeds, network types, application states, settings programmed onto the mote post-install, etc.  Basically anything that has a variable/buffer that needs to be retrieved from non-volatile memory after a reboot.
For those using Blackbook file system's Dictionary interface, this is like the Dictionary but extremely slimmed down for use on internal microcontroller memory - the keys are the parameterized interface number, and the value can be any type and size. 
 
 
RANDOM GENERATOR
/contrib/rincon/tos/lib/RandomGen
An extension of some previous Random components (Mlcg), RandomGen uses the Configuration component to periodically store the seed to non-volatile memory. If your mote reboots, the seed won't start back at the beginning.  For some applications, this is critical. 
 
 
Don't forget to check out the improved CC1000Radio stack in /contrib/rincon/tos/lib/CC1000Radio, and the TinyOS 1.x Style Guide in /contrib/rincon/docs
 
-David
 
 
 
 
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to