TinyOS for Eclipse on Ubuntu - pillforge/tinyos GitHub Wiki
-
Follow the instructions for installing TinyOS command line tools on Ubuntu
-
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
-
Start Eclipse, select "Help > Software Updates...".
-
You need to add a new update site, so click "Add...".
-
Enter the update site http://tos-ide.ethz.ch/update/site.xml (name: "Yeti2 Update Site") into the dialog.
-
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
-
Restart Eclipse and select the "TinyOS" perspective (Window menu).
-
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.
-
Run "TinyOS/Check installation..." for verifying your setup
-
Start a new example project: "File/New/Example..." and select "TinyOS Example"
Name: MyBlink Environment: TinyOS Unix Wrapper 2 Example: Blink Target: telosb
-
Select "Run/Run Configurations..." and select "TinyOS Build":
Name: MyBlinkConfig Project: MyBlink Extras: **select debug**
Click "Apply"
-
Click "Run/Run". The project should compile with no errors.
-
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"
-
Click "Run/External Tools/mspdebug" for programming the mote
-
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"
-
Select "Project/Properties" and select "TinyOS Source". Click on "Link Source..."
Linked folder location: /opt/tinyos Folder name: tinyos
-
Source code level debugging should work now by using "Run/Debug".