1 / 160

第 3 章 contiki 操作系统

物联网操作系统. 第 3 章 contiki 操作系统. Contiki-os 简介. Contiki-os 简介. Contiki-os 特点. Contiki-os 特点. Contiki-os 特点. Contiki 源码结构. Contiki 源码结构. Core 文件夹. CPU 文件夹. Contiki 源码结构. Examples 文件夹. Contiki 应用程序编写. Contiki 应用程序编写. Contiki 安装过程. Ubuntu14.04 下安装 contiki

edithe
Download Presentation

第 3 章 contiki 操作系统

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 物联网操作系统 第3章 contiki操作系统

  2. Contiki-os简介

  3. Contiki-os简介

  4. Contiki-os特点

  5. Contiki-os特点

  6. Contiki-os特点

  7. Contiki源码结构

  8. Contiki源码结构

  9. Core文件夹

  10. CPU文件夹

  11. Contiki源码结构

  12. Examples文件夹

  13. Contiki应用程序编写

  14. Contiki应用程序编写

  15. Contiki安装过程 • Ubuntu14.04下安装contiki sudo apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc binutils-avr gcc-avr gdb-avr avr-libc avrdude openjdk-7-jdk openjdk-7-jre ant libncurses5-dev doxygen git git clone git://github.com/contiki-os/contiki.git contiki3.0 • 测试contiki cd contiki/examples/hello-world make TARGET=native hello-world ./hello-world.native

  16. Small devices c compiler:SDCC (1)下载SDCC cd /optsudo svn co -r 7100 https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc/

  17. Small devices c compiler:SDCC (2)更改配置sudo vi /opt/sdcc/device/libs/incl.mk将最后一行MODELS = small medium large替换为MODELS = small large hugesudo vi /opt/sdcc/device/libs/Makefile.in将最后一行TARGETS += models small-mcs51-stack-auto替换为TARGETS += models model-mcs51-stack-autocd /opt/sdcc (3)运行如下命令:sudo ./configure --disable-gbz80-port --disable-z80-port --disable-ds390-port \--disable-ds400-port --disable-pic14-port --disable-pic16-port \--disable-hc08-port --disable-r2k-port --disable-z180-port \--disable-sdcdb --disable-ucsim

  18. Small devices c compiler:SDCC 此过程若出现configure: error: boost library not found (boost/graph/adjacency_list.hpp) 执行sudo apt-get install libboost-graph-dev 完成后,重新执行 sudo ./configure --disable-gbz80-port --disable-z80-port --disable-ds390-port \--disable-ds400-port --disable-pic14-port --disable-pic16-port \--disable-hc08-port --disable-r2k-port --disable-z180-port \--disable-sdcdb --disable-ucsim

  19. Small devices c compiler:SDCC (4)编译、安装 sudo makesudo make installsdcc –v 显示: SDCC : mcs51 3.1.1 #7100 (Jan 10 2013) (Linux)

  20. 编译cc2530dk (1)Hello world cd ~/contiki/examples/cc2530dkmake hello-world (2)生成Hex文件 Make TARGET=cc2530dk 主文件名

  21. Contiki仿真工具-cooja • 进入Contiki/tools/cooja/目录 • 运行命令:ant run • 出现问题执行如下命令: • git submodule init • git submodule update

  22. Cootiki OS https://github.com/contiki-os/contiki/wiki/ http://www.contiki-os.org/ The Kon-Tiki raft: sailed across the Pacific Ocean with minimal resources

  23. 启动Cooja

  24. 启动Cooja

  25. 建立一个新的仿真

  26. 建立一个新的仿真

  27. 仿真窗口

  28. 网络中添加传感器节点

  29. Cooja下简单程序举例

  30. Cooja下简单程序举例

  31. Cooja下简单程序举例-添加节点

  32. Cooja下简单程序举例-添加应用程序

  33. Cooja下简单程序举例-编译

  34. Cooja下简单程序举例-编译

  35. Cooja下简单程序举例-部署节点

  36. Cooja下简单程序举例-运行

  37. Cooja下简单程序举例-运行

  38. Cooja仿真界面

  39. Cooja仿真界面

  40. Cooja仿真界面

  41. Cooja仿真界面

  42. Contiki下的编程模型 • 基于事件驱动的线程编程 • Protothread

  43. Contiki进程

  44. Contiki进程

  45. Contiki进程 • Threads require Per-thread stack memory

  46. Contiki进程 • Threads require Per-thread stack memory

  47. Contiki进程 • The problem with events:code flow

  48. Contiki合并事件驱动和进程机制

  49. Contiki合并事件驱动和进程机制

More Related