TinyOS for Eclipse on Ubuntu - pillforge/tinyos GitHub Wiki

  1. Follow the instructions for installing TinyOS command line tools on Ubuntu

  2. Install Eclipse, the C Development Tools and the Graphical Editing Framework and all dependencies:

     sudo apt-get update
     sudo apt-get install eclipse eclipse-cdt eclipse-gef
    
  3. Start Eclipse, select "Help > Software Updates...".

  4. You need to add a new update site, so click "Add...".

  5. Enter the update site http://tos-ide.ethz.ch/update/site.xml (name: "Yeti2 Update Site") into the dialog.

  6. You are now able to select the plugins to install. You should select the following entries:

    • Yet2 - Core Plugin
    • Yet2 - TinyOS NesC 1.3.x Parser
    • Yet2 - TinyOS Base Environment
    • Yet2 - TinyOS 2.x on Unix
    • Yet2 - Formatter
    • Yet2 - Refactoring
    • Yet2 - TinyOS Debugger
    • Yet2 - TinyOS Search
  7. Restart Eclipse and select the "TinyOS" perspective (Window menu).

  8. Select "Window/Preferences" and setup the environment at the "TinyOS/Environments/TinyOS 2.x unix-environemnt" node. If you followed this tutorial the defaults should be OK, and no architecture specific paths should be set, otherwise set the directory paths properly.

  9. Run "TinyOS/Check installation..." for verifying your setup

  10. Start a new example project: "File/New/Example..." and select "TinyOS Example"

     Name: MyBlink
     Environment: TinyOS Unix Wrapper 2
     Example: Blink
     Target: telosb
    
  11. Select "Run/Run Configurations..." and select "TinyOS Build":

    Name: MyBlinkConfig
    Project: MyBlink
    Extras: **select debug**
    

    Click "Apply"

  12. Click "Run/Run". The project should compile with no errors.

  13. Select "Run/External Tools/External Tools Configurations..." and select "Program"

    Name: mspdebug
    Location: /usr/bin/mspdebug (or your custom location)
    Working Directory: select "Workspace..." and select "MyBlink/build/telosb"
    Arguments: rf2500 
               "prog main.exe"
    

    Click "Apply"

  14. Click "Run/External Tools/mspdebug" for programming the mote

  15. Select "Run/Debug Configurations..." and select "TinyOS Debugger"

    Name: MyBlinkDebug
    Project: MyBlink
    TinyOS Binary: build/telosb/main.exe
    GDB Proxy: User defined command
    GDB Proxy Command: mspdebug rf2500 gdb
    GDB Debugger: msp430-gdb
    Select "Verbose console mode"
    Port: 2000
    

    Click "Apply"

  16. Select "Project/Properties" and select "TinyOS Source". Click on "Link Source..."

    Linked folder location: /opt/tinyos
    Folder name: tinyos
    
  17. Source code level debugging should work now by using "Run/Debug".