galsC Installation Instructions
Last updated 25 April 2004 |
The galsC compiler is an extension of the nesC compiler. nesC is "an extension to the C programming language designed to embody the structuring concepts and execution model of TinyOS. TinyOS is an event-driven operating system designed for sensor network nodes that have very limited resources (e.g., 8K bytes of program memory, 512 bytes of RAM)." TinyOS, described at http://webs.cs.berkeley.edu/tos/, is used, for example, on the Berkeley MICA "motes," which are small wireless sensor nodes.
galsC programs are designed to run on the same platforms as nesC/TinyOS. However, galsC programs use the TinyGALS programming model, which replaces the TinyOS scheduler with a TinyGALS scheduler.
To install the galsC compiler and associated examples, you must first install TinyOS, then the galsC compiler. Choose one of the methods below to install each package. These instructions assume that you are either running linux or will be running Cygwin on Windows.
cd $TOSROOT/contrib/tinygals/apps/CntToLeds make mica
You need not install any previously released 1.1.x snapshots. That is, if you have 1.1.0 installed on your machine, you can jump right to installing 1.1.5 rather than installing 1.1.1... up to 1.1.5. Each 1.1.x CVS snapshot supercedes previous 1.1.x CVS snapshot releases.
rpm --force --ignoreos -Uvh tinyos-1.1.5Mar2004cvs-1.cygwin.noarch.rpmin the directory where you saved the rpm. This will take a while (the tinyos package installation includes compiling the java code). TinyOS is installed in /opt/tinyos-1.x.
export TOSROOT=<TINYOSDIR>/tinyos-1.x export TOSDIR=$TOSROOT/tos
setenv TOSROOT <TINYOSDIR>/tinyos-1.x setenv TOSDIR $TOSROOT/tos
If this is your first time installing, use:
rpm -ivh tinyos-contrib-1.1.2Apr2004cvs-1.cygwin.noarch.rpmOtherwise, upgrade using:
rpm -Uvh tinyos-contrib-1.1.2Apr2004cvs-1.cygwin.noarch.rpmThis rpm was created using Cygwin DLL version 1.3.22.
If this is your first time installing, do the following
(use the same TINYOSDIR
as above):
rpm -ivh --prefix <TINYOSDIR> tinyos-contrib-1.1.2Apr2004cvs-1.noarch.rpm cd <TINYOSDIR> chown -R <USER.GROUP> tinyos-1.xOtherwise, upgrade using:
rpm -Uvh --prefix <TINYOSDIR> tinyos-contrib-1.1.2Apr2004cvs-1.noarch.rpm cd <TINYOSDIR> chown -R <USER.GROUP> tinyos-1.x
rpm --ignoreos -ivh *.rpmin the directory where you saved the files.
rpm -ivh *.rpmin the directory where you saved the files.
mkdir -p $HOME/galsc
cd $HOME/galsc cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/tinyos login Hit Enter when prompted for a password cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/tinyos co tinyos-1.xThis will create a directory
tinyos-1.x
. For more
information, see http://sourceforge.net/cvs/?group_id=28656
.
export TOSROOT=$HOME/galsc/tinyos-1.x export TOSDIR=$TOSROOT/tos
setenv TOSROOT $HOME/galsc/tinyos-1.x setenv TOSDIR $TOSROOT/tos
Choose the appropriate directions for your system:
rpm -ivh galsc-0.1.0-1.cygwin.i386.rpm
rpm -ivh galsc-0.1.0-0.i386.rpm
/usr/local/galsc
.
mkdir -p $HOME/galsc
cd $HOME/galsc gunzip galsc-0.1.0.tar.gz tar xvf galsc-0.1.0.tar
cd $HOME/galsc/galsc-0.1.0 ./configure --prefix=$HOME/galsc
make make installThis will create directories in
$HOME/galsc
export GALSC=$HOME/galsc
setenv GALSC $HOME/galsc
You can also download the galsC source code and build it. It is based on the nesC compiler, which requires an impressive suite of tools.
For help with how to install these in Cygwin, see The Cygwin FAQ. Note that most installations will not have gperf on them, at least, so you will likely need to install at least that.
http://sourceforge.net/cvs/?group_id=56288
cd $HOME/galsc cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nescc login Hit Enter when prompted for a password cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nescc co -r galsc nesc
cd $HOME/galsc/nesc ./Bootstrap
./configure --prefix=$HOME/galsc
make make installThis will create directories in
$HOME/galsc
export GALSC=$HOME/galsc
setenv GALSC $HOME/galsc