Viptos Help

Users can generate nesC code from Viptos models by changing the PtinyOSDirector target from the ptII simulation target to the pc TOSSIM target or some other TinyOS target like mica or mica install.

Generating Code for the pc target

  1. Assuming you are looking at a demo model, look inside MicaBoard or MicaActor.
  2. Double-click on the PtinyOSDirector and change the target parameter to pc.
  3. Run the model as usual by hitting Control-R or hitting the green run button.
  4. Look in the output directory (you can find out what it was by double-clicking on the PtinyOSDirector and examining the destinationDirectory parameter. For demo models, this is usually demo_directory/output.
  5. To run the generated TOSSIM:
    cd demo_directory/output
    ./build/pc/main.exe 1
    
    This will run TOSSIM with 1 node.
  6. To only see selected debug output, you may also set your DBG environment variable to the known dbg modes described described when you run:
    ./build/pc/main.exe --help
    
    For example, in tcsh:
    setenv DBG=usr1,am
    
    or in Cygwin bash under Windows
    export DB=-usr1,am
    

Further information

For information about using Viptos, see the Viptos documentation.