Preparing environment for TinyOS¶
On a lab computer use a virtual machine with Ubuntu 16.04. On your personal laptop you can follow another approach (native installation, lxc/lxd, …) but it may be a good idea to start with VirtualBox too.
The following instructions assume the virtual machine with Ubuntu 16.04 setup.
Virtual machine¶
Install VirtualBox (already done in
the lab). Install Virtualbox Extension Pack (already done in the
lab). Add your user to the vboxusers
group (already done in
the lab):
sudo gpasswd -a <your-user> vboxusers
As an OS use Ubuntu 16.04 64-bit. For a virtual machine you can choose Lubuntu 16.04 – a lightweight flavor of Ubuntu.
Configure 2048 MB of RAM, 6-8 GB of dynamically allocated virtual hard disk.
Install the OS by setting the downloaded .iso file as the machine’s optical drive.
When the installation succeeds, install Guest Additions in the guest to gain a better user experience.
TinyOS toolchain and sources¶
Follow instructions from
http://tinyos.stanford.edu/tinyos-wiki/index.php/Automatic_installation. When
installing the toolchain (step 1) choose nesc
, tinyos-tools
(not tinyos-tools-devel
) and msp430-46
packages. You can also manually download and install these packages (see Manually installing TinyOS packages) if the website http://tinyprod.net/repos/debian/ doesn’t work smoothly. When setting environment variables (step 3) choose to modify .bashrc
.
Apply (manually) this
patch
to /usr/bin/tos-bsl
.
Verify that it works by building a simple TinyOS app:
cd ./tinyos-main/apps/Blink/
make telosb
IDE/editor¶
TinyOS apps are written using nesC progamming language. Check whether your favourite IDE/editor supports it.