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
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.
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
http://anrg.usc.edu/contiki/index.php/Troubleshooting
ReplyDeletesolucionado problema
Hello Nicolas,
ReplyDeleteI 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.
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!
ReplyDeletehello 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.
ReplyDeleteHello Ladan,
ReplyDeleteYes it is possible to make target with InstantContiki 3.0
Hello DMI,
Deletegreat, can you please help me with the guide of how to do it.
Hello Nicholas,
ReplyDeletegreat, can you please help me with the guide of how to do it.
Thank you.
You will need to have installed IntantContiki 3.0 and you have xm1000 mote.
DeleteLet me know when you have these intstalled and ready
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.
DeleteThank you.
I dont use Mac but I think it should work pretty the same.
ReplyDeleteNow, 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?
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.
DeleteI managed to run and upload the Blink application (check platform/xm1000/apps/README.txt). Hopefully you can work from that and test other functionalities.
ReplyDeletehttps://drive.google.com/file/d/0B9SNeNT6uF1TLVpSY1ZWREhYQ1E/view?usp=sharing
Thank you, but I'm bit confused, please how can i upload the blink application?
DeleteFrom the error you are having, do the following:
ReplyDelete1. 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.
Hello DMI,
DeleteThank 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"
Hello,
ReplyDeleteYou 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.
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
DeleteIt is zipped file. use 7zip.
DeleteI tried open it using 7zip but still couldnt open it
DeleteSorry 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