Hello World for Contiki on XM1000

In my last post, I explain how to run a Hello World for Contiki on IRIS-XM2110 Mote.
Now, I explain how to do on a MTM-XM1000.

First, as in the previous case, we need check that xm1000 is within the targets.
For include it in contiki, we need download it from the developer site and include in contiki folder.
wget http://www.advanticsys.com/shop/documents/1429538511_contiki-xm1000-v2015-04-15.rar
unrar x 1429538511_contiki-xm1000-v2015-04-15.rar
cd contiki-xm1000-v2015-04-15/contiki/

Now copy the content of tools/ and platform/ in your Contiki directory
cp -R * $YOUR_CONTIKI_PATH

If we compile the file hello-world.c, remember that now you must do it with TARGET=xm1000
make TARGET=xm1000 savetarget
make hello-world
sudo make hello-world.upload

This is a typically error:
../../core/dev/sht11.c: In function ‘sht11_init’:
../../core/dev/sht11.c:218:4: warning: #warning SHT11: DISABLING I2C BUS [-Wcpp]
../../core/dev/sht11.c:221:5: error: ‘SHT11_PxREN’ undeclared (first use in this function)
../../core/dev/sht11.c:221:5: note: each undeclared identifier is reported only once for each function it appears in
../../Makefile.include:214: recipe for target 'obj_xm1000/sht11.o' failed
make: *** [obj_xm1000/sht11.o] Error 1

To fix it, add this line in contiki/platform/xm1000/dev/sht11-arch.h
#define SHT11_PxREN  P1REN

Now, re-compile your code.

Maybe you should get this message:

make[2]: execvp: ../../tools/xm1000/xm1000-bsl-linux: Permission denied
../../platform/xm1000/Makefile.common:111: recipe for target 'xm1000-r.-dev-ttyUSB0' failed

This means that xm1000-bsl-linux doesn't have execution permission. To fix this, execute as follows:

chmod +x ../../tools/xm1000/xm1000-bsl-linux

Now, retry and enter to the console and restart the mote:
sudo make hello-world.upload
sudo make login











Comments

  1. http://anrg.usc.edu/contiki/index.php/Troubleshooting

    solucionado problema

    ReplyDelete
  2. Hello Nicolas,
    I seem to have some challenges with the XM100 motes while trying to compile it so it could be recognized as a target destination.
    I have copied and pasted all platform and tools folder as instructed above. However, this is the error I am still encountering when I try to run make using xm1000 as the target. I am using InstantContiki3.0.

    These are the commands I entered while trying to compile hello-world to the xm1000 mote:
    Cd example/hello-world
    Make TARGET=xm1000 savetarget
    Make hello-world


    And this is the error I encountered below:

    user@instant-contiki:~/contiki/examples/hello-world$ make hello-world
    using saved target 'xm1000'
    make: *** No rule to make target `obj_xm1000/cc2420.o', needed by `contiki-xm1000.a'. Stop.

    ReplyDelete
  3. Yes, I also have the same problem with make: *** No rule to make target `obj_xm1000/cc2420.o', needed by `contiki-xm1000.a'. Stop. Does anybody know how to fix that? Thank you!

    ReplyDelete
  4. hello nicolars i'm using contiki3.0 is it possible to run make target with xm1000 mote with contiki 3.0. if yes, please i really need your help.

    ReplyDelete
  5. Hello Ladan,
    Yes it is possible to make target with InstantContiki 3.0

    ReplyDelete
    Replies
    1. Hello DMI,
      great, can you please help me with the guide of how to do it.

      Delete
  6. Hello Nicholas,
    great, can you please help me with the guide of how to do it.

    Thank you.

    ReplyDelete
    Replies
    1. You will need to have installed IntantContiki 3.0 and you have xm1000 mote.
      Let me know when you have these intstalled and ready

      Delete
    2. Thank you very much, i have already installed instantContiki 3.0 on vmware fusion using Mac in ubuntu 14.04 and i also have the xm1000 mote ready.

      Thank you.

      Delete
  7. I dont use Mac but I think it should work pretty the same.
    Now, have you had a primer on how to install and run the "hello world" program above.
    Where are you on right so I can advise what next to do?

    ReplyDelete
    Replies
    1. i have done almost everything is just that i cannot make target with xm1000 mote, when ever typed " make TARGET=xm1000 hello-world" to compile this is what is been showing me /../Makefile.include:140: *** The target platform "xm1000" does not exist (maybe it was misspelled?). Stop.

      Delete
  8. I managed to run and upload the Blink application (check platform/xm1000/apps/README.txt). Hopefully you can work from that and test other functionalities.

    https://drive.google.com/file/d/0B9SNeNT6uF1TLVpSY1ZWREhYQ1E/view?usp=sharing

    ReplyDelete
    Replies
    1. Thank you, but I'm bit confused, please how can i upload the blink application?

      Delete
  9. From the error you are having, do the following:
    1. Make sure the xm1000 mote is connected on the contiki platform. Since it is virtual platform you need to make sure it is connected as USB001.
    2. run the following command to make sure that you have permission on the file xm1000-bsl-linux and othe changes.
    sudo chmod a+x xm1000-bsl-linux
    sudo usermod -a -G dialout user
    3. Run make again.

    ReplyDelete
    Replies
    1. Hello DMI,

      Thank you very much for your help, but I'm still having problem when ever i run "sudo chmod a+x xm1000-bsl-linux" this is the error that will display on the screen "cannot access ‘xm1000-bsl-linux’: No such file or directory"

      Delete
  10. Hello,
    You need to update the xm1000-bsl-linux. The original one you have is not up-to-date. get the updated version. It is contained in the doc I sent to you.

    ReplyDelete
    Replies
    1. thank you so much, but i cannot open the document you have sent to me it seem there is some error on it, can you please check and resend it again. thank you

      Delete
    2. It is zipped file. use 7zip.

      Delete
    3. I tried open it using 7zip but still couldnt open it

      Delete
  11. Sorry for the delay. I upgraded the DMI's patch with a sensors app. Please, see my last post https://installfights.blogspot.cl/2017/03/contiki-30-on-xm1000.html

    ReplyDelete

Post a Comment

Popular posts from this blog

from: can't read /var/mail/ in Python scripts

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

Fix "Set scan parameters failed: Input/output error" on Ubuntu 16.04