Sorry about the premature send. 

Here's an example of the output this FlashViewer program provides if anybody's 
interested. It renders much better in the console than it does in this email.. 
That's for sure.  And it can be used in conjunction with another app on the 
mote to debug flash.

I'll include the information below in its readme.

Here I'm reading from an STM25P80 telos flash chip.  You can see I uploaded a 
file to it called com.zip.

$ flashviewer -read 0x0 0x100
0x0 to 0x100
_________________________________________________
03 03 37 E4 63 6F 6D 2E   7A 69 70 00 00 00 00 00   |  ♥♥7Σcom.  zip
00 00 FF FF 50 4B 03 04   0A 00 00 00 00 00 41 59   |      PK♥♦
67 34 00 00 00 00 00 00   00 00 00 00 00 00 0B 00   |   4              ♂
00 00 63 6F 6D 2F 72 69   6E 63 6F 6E 2F 50 4B 03   |    com/ri  ncon/PK♥♦
04 0A 00 00 00 00 00 90   53 39 34 00 00 00 00 00   |
00 00 00 00 00 00 00 14   00 00 00 63 6F 6D 2F 72   |         ¶     com/ri
69 6E 63 6F 6E 2F 63 6F   6D 70 6F 72 74 73 2F 50   |   ncon/co  mports/PK
4B 03 04 14 00 00 00 08   00 DA 82 2D 34 CE FE 46   |   ♥♦¶     ┌?-4╬■FF
46 FE 02 00 00 A7 05 00   00 24 00 00 00 63 6F 6D   |   ■☻  º♣    $   com/
2F 72 69 6E 63 6F 6E 2F   63 6F 6D 70 6F 72 74 73   |   rincon/  comports/
2F 43 6F 6D 50 6F 72 74   73 24 31 2E 63 6C 61 73   |   ComPort  s$1.class
73 7D 53 5D 53 12 61 14   7E 5E 04 57 71 4D 25 CD   |   }S]S↕a¶  ~^♦WqM%═░
B0 52 29 4A 40 01 C9 2C   13 B3 8C B2 A8 45 2D 8C   |   R)[EMAIL PROTECTED],  
‼│?▓¿E-?╥
D2 1A 67 D6 75 07 D6 81   5D 5A 96 C6 2E BA E9 CA   |   →g╓u╓?  ]Z?╞.║Θ╩┐
BF E0 2F E8 A6 9B 2E 52   CB 99 A6 EB 7E 54 D3 79   |   α/Φª?.R  ╦?ªδ~T╙y_
5F 40 CD AF 9D D9 7D CF   7B CE 73 9E F3 B9 7F FE   |   @═»?┘}╧  {╬s?≤╣⌂■

I can erase this sector:
$ flashviewer -erase
SUCCESS: Erase complete

And then write some bytes to it:
$ flashviewer -write 0 ThisIsFlashViewer!
Writing data
0x54 0x68 0x69 0x73 0x49 0x73 0x46 0x6c 0x61 0x73 0x68 0x56 0x69 0x65 0x77 0x65
0x72 0x21
SUCCESS: 18 bytes written to 0x0

And then read it back:
$ flashviewer -read 0x0 0x20
0x0 to 0x20
_________________________________________________
54 68 69 73 49 73 46 6C   61 73 68 56 69 65 77 65   |  ThisIsFl  ashViewer
72 21 FF FF FF FF FF FF   FF FF FF FF FF FF FF FF   |   !                

-david




-----Original Message-----
From: David Moss [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 07, 2006 12:23 PM
To: 'L Tony'; '[email protected]'
Subject: RE: [Tinyos-help] write/read from flash on telosb mote 


Fyi, I uploaded a FlashViewer nesC and Java application to /contrib/rincon/.

It lets the user control the flash on the mote through the BlockStorage 
interface.  This allows you to experiment with flash behavior and double check
that your flash programs are working correctly.


Here are some example commands from the readme:

see if the FlashViewer is installed on the mote:
flashviewer -ping

reading flash, from address 0x0 to address 0x1200:
flashviewer -read 0x0 0x1200

reading flash, from address, 0x10000 to address 0x200:
flashviewer -read 0x10000 0x200

writing characters to flash starting at 0x0:
flashviewer -write 0x0 HelloWorld!

mounting to a volume in flash:
flashviewer -mount 0
Commit to flash (at45db only):
flashviewer -commit

erasing a volume in flash:
flashviewer -erase


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of L Tony
Sent: Monday, March 06, 2006 3:20 PM
To: [email protected]
Subject: [Tinyos-help] write/read from flash on telosb mote 


Hi,

I use telosb mote. In my project, I use a t-mote to receive a sequence of 
packets. For every received packet, the mote writes some value (like RSSI) 
to the mote's flash. Then I connect the mote to laptop and read all the 
bytes from flash. I searched the archive and found I should use the updated 
BlockStorage instead of ByteEEPROM. But I don't know how the BlockStorage 
works. Are there any example application using BlockStorage? Thanks.

Best regards,
Tony

_________________________________________________________________
享用世界上最大的电子邮件系统— MSN Hotmail。  http://www.hotmail.com  

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to