Hello World for Contiki on IRIS-XM2110 Mote

For this model, we need a contiki version that supports it. In github, exists a project for contiki-iris that supports this target.

git clone https://github.com/bulajicm/contiki-iris-examples.git
cd contiki-iris-examples/examples/hello-world
make targets (if you see iris, we are ok)
make TARGET=iris savetarget
make hello-world

make: avr-gcc: Command not found

You need to install avr-gcc:
sudo apt-get install gcc-avr

Other common error is:

avr/io.h: No such file or directory

You can use apt-file search avr/io.h to search which library you need to install.
sudo apt-get install avr-libc

Now, we have a .iris file. You need flash your mote with this file. Every where saids that with make hello-world.upload it works, but it doesn't, because Makefile doesn't include an upload option.

We can do the same with avrdude. You only need follow this commands:

sudo apt-get install avrdude
avr-objcopy --output-target=srec hello-world.iris main.srec
cp main.srec main.srec.out
sudo avrdude -cmib510 -P /dev/ttyUSB0 -U hfuse:w:0xd9:m -pm1281 -U efuse:w:0xff:m -C /etc/avrdude.conf -U flash:w:main.srec.out:a

Now, the flash it's ok. For view the iris console, type sudo make login and restart the mote pushing the reset button.


Maybe you would see this error at compile time:

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

Above happens because exist a poor contact between IRIS 51-pin expansion connector and MIB520CA Mote Interface Board.



Comments

  1. Hola NIcolƔs, tengo el siguiente problema.... CUando ingreso el comando sudo make login, me arroja el siguiente error:

    using saved target 'iris'
    ./../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB1
    make: ./../../tools/sky/serialdump-linux: No se encontró el programa
    make: *** [login] Error 127
    prolab@prolab-desktop:~/contiki-iris-examples/examples/hello-world$

    He repetido varias veces el tutorial pero no pasa nada.

    Saludos

    Pd: Saludos al Yasmany

    ReplyDelete
    Replies
    1. hace falta el programa serialdump-linux. Verifica que esté en tools/sky y si no le haces un link simbólico a esa ruta.

      Delete
  2. hello,

    I got error while running command sudo make login

    using saved target 'iris'
    ./../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB1
    connecting to /dev/ttyUSB1 (115200)
    /dev/ttyUSB1: No such file or directory
    make: *** [login] Error 255


    please help me regarding this.

    ReplyDelete
    Replies
    1. Check wich interface has your mote with dmesg command. Maybe other interface is associated to it.

      Delete

Post a Comment

Popular posts from this blog

How to fix Android when developer options are not available for this user

Contiki 3.0 on XM1000

How to fix VirtualBox error when you try to import an ova file