~ [ source navigation ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
cvs/emstar/tos-contrib/moap/


Name Size Last modified (GMT) Description
Back Parent directory 2010-03-21 13:27:26
Folder apps/ 2010-03-21 13:27:14
Folder doc/ 2010-03-21 13:27:14
Folder tools/ 2010-03-21 13:27:14
Folder tos/ 2010-03-21 13:27:14
File README 4210 bytes 2004-04-28 22:58:41

  1 MOAP Code Distribution using Differential Compression
  2 Tom Yeh
  3 Rahul Kapur
  4 Ujjwal Lahoti
  5 
  6 INSTALLATION INSTRUCTIONS
  7 1)Untar moap_diff.final.tar in the tos-contrib directory (if a moap directory currently
  8 exists move the existing directory to another name) 
  9 
 10 
 11 
 12 DIRECTORY STRUCTURE
 13 apps/
 14         This directory contains two applications.  The MoapTest application is a simple Blink program
 15         with a hook to Moap.  The application blinks the yellow led until it hears a publish request
 16         from another mote, at which point it proceeds with the MOAP DIFF application.  The second 
 17         application is a modified Blink which just turns the green LED on.  Our sample test changed
 18         loaded MoapTest on the mote and then sent a diff to convert it to the modified Blink application.
 19         (See documentation as to why the modified Blink was used as the new binary).
 20 
 21 doc/
 22         Contains the original MOAP instructions
 23 
 24 moap_emstar/
 25         This directory contains the EMSTAR side of the moap code.  This directory should be replace the 
 26         /devel/link/ directory inside your emstar directory.  Changes were done to moapsource.c to 
 27         parse in a diff binary instead of an srec file.  Also the moap-sc was changed to simulate our 
 28         moap diff code on EmTOS.
 29 
 30 tools/
 31         The tools directory contains the bootloader srec and isntallation files.  It also contains the 
 32         diff_tool to do differential compression.  The diff_files directory inside diff_tools contains
 33         the object dump files and binary diff files for our sample application.
 34 
 35 tos/
 36         This directory contains the source code for MOAP Diff.  the system/ directory contains all our
 37         added and changed files.
 38 
 39 RUNNING THE DIFF TOOL
 40 The diff tool requires the mica2 built .exe files for both the original and new version of the code.  On 
 41 each .exe file run 'avr-objdump -z S <filename>.exe > <filename>.cxx'.  One thing to note is that
 42 the avr-objdump on the cygwin seems to work correctly but on the cens machines creates a dump file with
 43 high level code embedded in it.  We use the avr-objdump on cygwin since it provides the correct format.
 44 
 45 Next run 'perl diff.master.final'.  The the script will ask the source and destination cxx files created
 46 in the above step.  The result will be a final.diff file.  This file contains a ascii text based set of 
 47 instructions to convert the old version to the new version.
 48 
 49 Finally run 'perl bin.perl' which will take the final.diff file and create a final.bin.  This final.bin
 50 is the binary diff file that needs to be sent to moapsource.
 51 
 52 The diff_file directory contains the cxx, diff, and bin files for the moap2blink code tested on the motes.
 53 
 54 RUNNING MOAP DIFF ON EMTOS
 55 
 56 When running on EMTOS we need to mimic the instruction ROM. To do this we have created a emtos_memcpy_P
 57 command which loads an srec of the binary into memory and uses it as instruction ROM memories.  Open
 58 ProcessM.nc and change the emtos_memcpy_init to point to the srec file of the application running your
 59 mote.  In our example application it needs to point to the apps/MoapTest/build/mica2/main.srec file. Once
 60 this change is made, compile your application with 'make mica2' to create the srec file and then
 61 'make emstar' to create your emtos executable.  In our case compile in apps/MoapTest.  
 62 
 63 
 64 For moapsource the  moap_emstar directory has to be copied to the emstar directory as described above and compiled.
 65 Next change moapsource_tab to use the bin file created by the Diff tool. Change moap_tab to point to the 
 66 emstar binary compiled by make emstar. Then change moap-sc to configure the preferred radio model number of 
 67 nodes.  Currently we are using two nodes, one is an Emstar moapsource and the other is a TOS mote.
 68 
 69 When the above is configured run 'emrun/emsim <your path to moap-sc>'  from the obj directory in emstar.
 70 
 71 RUNNING MOAP DIFF ON THE MOTES
 72 Compile the apps/MoapTest to mica2.  Install the srec file onto the mote with a non-zero id number.  Next 
 73 install the bootloader on the mote.  (NOTE Bootloader must be installed AFTER the application).  Next 
 74 install Transciever on a mote and link it to your emstar pc with a serial cable.  Make sure that hostmote
 75 and motenic is running.  Start the moapsource executable with the .bin file and version number.
 76 
 77 
 78       

~ [ source navigation ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.