物联网操作系统 - Contiki

What is Contiki?

  Contiki is an open source operating system for the Internet of Things. Contiki connects tiny low-cost, low-power microcontrollers to the Internet. Contiki is a powerful toolbox for building complex wireless systems.

开始使用Contiki

  官方:http://www.contiki-os.org/

开发环境:

  宿主机:Windows 10 Pro 64-bit (10.0, Build 10586)

  虚拟机:VMware® Workstation 11.1.1 build-2771112

  集成环境:Instant Contiki 3.0 , 解压:

  在VMware中新建虚拟机ubuntu_contiki,过程中使用Instant_Contiki_Ubuntu_12.04_32-bit.vmdk虚拟磁盘。

  启动新建虚拟机ubuntu_contiki,登录密码为 user 。

使用Cooja

$ cd contiki-3.0/tools/cooja
$ ant run

BUT 执行 ant run ,有如下报错:

解决办法:

在 https://github.com/contiki-os/mspsim.git 中下载mspsim-58f187351f3417814aa2d0d92af9e2bb768d92ee.zip文件;

解压,并拷贝到/contiki-3.0/tools/mspsim/ 目录下;

重新在/contiki-3.0/tools/cooja/ 下执行 ant run 

仿真运行Contiki小例程

创建一个新的仿真:

设置仿真选项:

添加 motes 到仿真

创建新的mote type ,选择一个应用及其源代码文件   (例如:ipv6 udp )

编译(点击Compile)、创建(点击Create)应用 

添加节点仿真

开始(点击Start)、暂停(点击Panuse)仿真

运行Contiki 小例程

先运行一个hello world (^_^)试试!

在目录/contiki-3.0/examples/hello-world 中,执行make

/contiki-3.0/examples/hello-world$ make

生成hello-world.native 文件,执行 ./hello-world.native

/contiki-3.0/examples/hello-world$ ./hello-world.native

清除执行:

/contiki-3.0/examples/hello-world$ meke clean

或者

/contiki-3.0/examples/hello-world$ make distclean

说明:make clean仅仅是清除之前编译的可执行文件及配置文件。 而make distclean要清除所有生成的文件。

注:hello-world 小例程的分析请参考:http://www.cnblogs.com/abatei/p/5137392.html

---------END

转载于:https://www.cnblogs.com/kinging/p/5867885.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值