这里会显示出您选择的修订版和当前版本之间的差别。
cc2650:development_environment_set_up [2017/08/31 22:04] 127.0.0.1 外部编辑 |
cc2650:development_environment_set_up [2021/06/22 23:14] |
||
---|---|---|---|
行 1: | 行 1: | ||
- | < | ||
- | # CC2650 Contiki 开发环境搭建 # | ||
- | 对于Contiki 6Lowpan所有开发资源,我们建议直接从[官方](http:// | ||
- | * [Contiki ](http:// | ||
- | * [Contiki-GitHub](https:// | ||
- | |||
- | ## 下载安装 ## | ||
- | |||
- | ### 下载Instant Contiki ### | ||
- | **Instant Contiki**是VMware的虚拟机镜像文件,Contiki已经部署好所有6LowPan交叉编译、仿真环境,同时打包好工具、源码到这个**Instant Contiki**镜像文件。所以我们只需要下载后解压,并且尝试VMware虚拟机软件打开。 | ||
- | |||
- | 大文件(3个G),如果[官方链接](https:// | ||
- | ![](http:// | ||
- | |||
- | > | ||
- | |||
- | ### 安装 VMWare 虚拟机 ### | ||
- | 对于虚拟机,为了不必要麻烦,建议同我们版本保持一致。直接双击安装`VMware-workstation-full-12.1.0-3272444.exe` | ||
- | ![](http:// | ||
- | 一路Next。成功安装VMware后,我们双击桌面图标启动软件。选择**打开虚拟机**-> | ||
- | ![](http:// | ||
- | ![](http:// | ||
- | 在启动**InstantContiki3.0**前,我们先配置网络连接为桥接模式,方便同Windows进行SSH远程连接实现文件共享。右键选择**InstantContiki3.0**-> | ||
- | ![](http:// | ||
- | 成功启动Ubuntu后,我们需要在此界面输入密码:`user` | ||
- | ![](http:// | ||
- | > | ||
- | |||
- | 成功进入桌面后,我们首先确定网络连接状态。确定其正常桥接了Windows的网络适配器,并且成功分配IP,并且能够正常访问Internet。 | ||
- | ![](http:// | ||
- | ![](http:// | ||
- | 记住以上IP,我们尝试在Windows命令窗口(Win+R CMD)ping虚拟机。 | ||
- | ![](http:// | ||
- | 正常访问连接后,我们打开桌面`Terminal`, | ||
- | ```shell | ||
- | cd / | ||
- | ls -al | ||
- | ``` | ||
- | ![](http:// | ||
- | Contiki源码通过Git进行版本管理,Clone远程地址https:// | ||
- | ```shell | ||
- | git submodule sync && git submodule update --init | ||
- | ``` | ||
- | 这里我们尝试编译进入到`contiki/ | ||
- | |||
- | ```shell | ||
- | cd contiki/ | ||
- | make TARGET=srf06-cc26xx BOARD=launchpad/ | ||
- | ``` | ||
- | 成功编译后,在我们当前目录会生成一个*.bin, | ||
- | ![](http:// | ||
- | |||
- | 接下来,我们讨论如何将bin拷贝到Windows进行下载。 | ||
- | |||
- | ### 安装SSH工具 ### | ||
- | SSH 是一个扩平台的远程登录会话协议,利用它,我们可以轻松实现在Windows上面访问Ubuntu虚拟机,同时轻松实现、Terminal远程连接。文件共享 | ||
- | 在虚拟机上面,我们直接安装SSH服务端,在线更新,确保网络连接。 | ||
- | ``` | ||
- | sudo apt-get install openssh-server | ||
- | # | ||
- | ``` | ||
- | Windows安装 | ||
- | ![](http:// | ||
- | |||
- | > | ||
- | |||
- | 成功配置后,我们点击连接,同时需要输入我们`Usert`用的密码`user`。 | ||
- | ![](http:// | ||
- | 成功连接后,我们启用文件传输工具,下载刚才的成功编译的*.bin。 | ||
- | ![](http:// | ||
- | 我们直接通 | ||
- | ![](http:// | ||
- | ### FlashProgrammer2 ### | ||
- | Flash Flash Programmer 2 是一款Windows离线编程工具,利用它我们可以将虚拟机编译的的*.bin直接烧写到我们CC2650 Flash固化。 | ||
- | |||
- | ### Troubleshooting ### | ||
- | #### Coojia 编译失败 #### | ||
- | |||
- | ![Coojia 编译失败](http:// | ||
- | ``` | ||
- | BUILD FAILED | ||
- | / | ||
- | / | ||
- | ---------------- | ||
- | Could not find the MSPSim build file. Did you run "git submodule update --init"? | ||
- | ---------------- | ||
- | ``` | ||
- | |||
- | 第一次下载编译Contiki 源码需要git更新,同时保持子模块也最新版本。所以会编译报错。 | ||
- | |||
- | ``` | ||
- | # 确保使用最新的 cc26xxware | ||
- | $ git submodule sync && git submodule update --init | ||
- | ``` | ||
- | |||
- | |||
- | #### CC26x0 编译错误, | ||
- | ``` | ||
- | user@instant-contiki: | ||
- | CC cc26xx-demo.c | ||
- | In file included from ../ | ||
- | from ../ | ||
- | from cc26xx-demo.c: | ||
- | ../ | ||
- | # | ||
- | ``` | ||
- | |||
- | 更新最新的cc26xxware软件。 | ||
- | ``` | ||
- | # 确保使用最新的 cc26xxware | ||
- | $ git submodule sync && git submodule update --init | ||
- | ``` | ||
- | |||
- | ## 加入我们 ## | ||
- | 文章所有代码、工具、文档开源。加入我们[**QQ群 591679055**](http:// | ||
- | <div> | ||
- | <p align=" | ||
- | <a target=" | ||
- | © Copyright 2017, 成都乐控畅联科技有限公司. | ||
- | </p> | ||
- | </ | ||
- | </ | ||