Choose "Install from Internet" and then specify where you want to install cygwin (recommended installation path: C:$
$cygwin). Continue with the installation until you are asked to select packages. Most packages can be left as "Default" but there is one package that are not installed by default. Install the following package by clicking at "Default" until it changes to "Install":
When cygwin is installed there should be a cygwin icon that starts up a cygwin bash when clicked on. Whenever it is time to compile and send programs to the ESB nodes it will be done from a cygwin shell.
Crimson Editor can be found at: http://www.crimsoneditor.com/
The editor is useful both when editing C programs and when modifying scripts and configuration files.
Download and install the GCC toolchain for MSP430 (recommended installation path: C:$$MSP430$$): mspgcc-20041112
.exe.
You will also need some tools for sending the compiled programs over to the ESB nodes. Install the IAR Embedded Workbench (Kickstart Version) package (recommended installation path: C:$$MSP430$$IARSystems): fet_r304.exe
.
When the above software is installed you also need to set-up the PATH so that all of the necessary tools can be reached. In cygwin this is done by the following line (given that you have installed at recommended locations):
export PATH=$PATH:/cygdrive/c/MSP430/IARSystems/ew23: /cygdrive/c/MSP430/IARSystems/ew23/430/bin:/cygdrive/c/MSP430/mspgcc/bin
This line can also be added to the .profile startup file in your cygwin home directory (C:$$cygwin$$home$$<YOUR
username>="">$$.profile
).
If your home directory is located elsewhere you can find it by starting cygwin and running cd
followed by pwd
.
Download Contiki for ESB nodes from the same page as before (Contiki ESB).
Unzip the Contiki OS at (for example) C:$$ and you will get the following directories:
labs/intro
. Then call make esbintro
.
If you get an error about multiple cygwin dlls when compiling, you need to delete cygwin1.dll
from the MSP430 GCC toolchain (C:$
$MSP430$$bin$$cygwin1.dll).
Connect a node and turn it on. Upload the test application by calling make
esbintro.u.
make <SPEC>
will compile and make a executable file ready for sending to the ESB nodes. Depending on the SPEC it might even startup the application that sends the executable to the node. During this course you would typically write things like "make esbintro.u"
to get the file esbintro.c compiled, linked and sent out to the ESB node
make
cd <DIR>
change to a specified directory (same as in DOS) pwd <DIR>
shows your current directory ls
list the directory mkdir <DIR>
creates a new directory cp <SRC> <DEST>
copies a fileesbintro
application (remember to change directory to contiki-esb before you run make
) modify the C code and make the yellow led be on when the red is off (and vice versa). The code is in the contiki-esb/labs/intro
folder. Hint: Add another line controlling the yellow led in the section: if (timer_expired(&timer)) { timer_reset(&timer); leds_red(on ? LEDS_ON : LEDS_OFF); on = !on; }