Beruflich Dokumente
Kultur Dokumente
Here I have gathered my experience from installing MIZAZ cross compiler on Linux and running
Contiki applications on this sensor node. Thank to all people who have shared their experiences before
me and I benefited them.
I followed partly the instructions of "How Build your own packages" at this website:
http://blog.coldtobi.de/1_coldtobis_blog/archive/21_updating_avr-
gcc_binutils_to_get_the_devices_update_now_also_includes_deb_files.html
depending on the version of your linux and your previously installed packages, it may ask you to install
some required packages and usually yuo can do that easily with sudo apt-get-install. As I needed
to install dpkg-dev.
Here you may receive message that it needs some packages like bison, flex and dbs. I installed all
with apt-get install and run the above command again.
4. Install the binutils package:
sudo dpkg -i ../binutils-avr_2.18-4ubuntu1_amd64.deb
5.Here you have two options:
1. installing avr-libs with apt-get install which installs gcc-avr as well or follow to step 6.
sudo apt-get install avr-libc
6.Download gcc:
wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.3.2/gcc-core-
4.3.2.tar.bz2
wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.3.2/gcc-g++-
4.3.2.tar.bz2
In this case also the patches don't exist in the mentioned path at this website.
9. In this case you have already made the avr-libc package and just need to install it:
sudo dpkg -i avr-libc_1.6.2.cvs20080610-2_all.deb
10. At this point everything is ready to cross-compile our programs for MICAz sensor node (In other
words for AVR microprocessors inculding MICAz sensor nodes :) ). And you can use avr-gcc to
compile your programs as follows:
avr-gcc -mmcu=atmega128 test1.c
If you haven't managed to make the avr-gcc compiler up and running, you can follow the insructions at
Section 2 otherwise go to Section 3 to compile your programs for Contiki OS running on the MICAZ
nodes.
Anyway this website lacks some of the steps that you may encounter during installation so
here I have included them as well:
2.1.1Binutils
First thing to do here is to visit the BinutilsPatches page and either grab the pre-prepared source or the
patch. Note that if you get the patch you must follow the rest of the procedure on that page in order to
prepare your source for building, you cannot simply dive in.
Once you have your prepared source, either manually prepared or downloaded pre-prepared the rest of
the process is to execute the familiar configure: make: make install procedure:
$ ./configure --target=avr32-linux
$ make
$ sudo make install
Note: While you make the binutils, you may get some errors which are non-fatal warnings but new gcc
versions like the one shipping with Ubuntu 8.10 stop on them. In order to prevent this, you need to add
-Wno-error to compiler flags in the MakeFile. Find the following lines in the MakeFile
and edit them accordingly:
CFLAGS = -g -O2
CXXFLAGS = -g -O2
If you haven't already installed, you need to do that and specify their locations using --with-gmp and
–with-mpfr.
You may need to install m4 for gmp if it complains while configuring it. You can install m4 (sudo
apt-get install m4). You need to install gmp and mpfr.
Note, however, the extra options to configure. Since we don't have a C library, there is simply no way
we can build the C++ support libraries. Thread support requires support from the C library as well, so it
must be disabled for now.
libmudflap and libssp are both run-time checking libraries which have been known to cause errors
at this early stage. They can safely be disabled for this bootstrap build though neither seem to cause an
error for the main build described below.
2.3 AVR32studio
The AVR Studio 4 is the Integrated Development Environment (IDE) for developing 8-bit AVR
applications in Windows NT/2000/XP/Vista/7 environments. They do not support Linux. But there are
some users that find their way to implement it on Linux. You can refer to the third party website
www.avrfreaks.net where similar kind of discussions on AVR devices are taken place.
3 Contiki on MICAZ
Since 9th of September 2009, Contiki supports MICAZ nodes as well as other platforms like TmoteSky.
At this stage, you need to have "avr-gcc", "avr-libc" and "uisp" installed.
Do not install uisp using apt-get install because it seems that this official verion of uisp
does not work with MIB510 programming boards. You have to use TinyOS version of uisp. They
have done some modifications.
1. Get the file from this address: http://azadeha.at.ifi.uio.no/uisp.tar.gz' and run following commands to install
uisp:
# tar -xvzf uisp.tar.gz
# cd uisp
# ./bootstrap
# ./configure
# make
# sudo make install
You can compile applications as usual in other platforms. For example: In "hello-world" application,
you can use the following command to compile and upload the OS to MICAz node.
Currently, only "mib510" programming board is supported. Serial communication, LEDs and simple
radio communication are tested on real MICAz nodes. Joakim Eriksson is working on Cooja simulation
support for the port Moreover, drivers for MTS300 sensor board are added but not tested for
correctness of the readings. Since MICAz port is still experimental, bugs, bug fixes and comments are
welcomed with great pleasure.
5 Useful links
AVR cross compiler for Mac OS X: http://www.ethernut.de/en/documents/cross-toolchain-osx.html
AVR forum: http://www.avrfreaks.net/
AVR32 Linux tool chain: http://avr32linux.org/twiki/bin/view/Main/
AVR MCU producer: www.atmel.com
Contiki homepage: http://www.sics.se/contiki/
Contiki developers mailing list: http://sourceforge.net/mailarchive/forum.php?forum_name=contiki-
developers