logo资料库

pixhawk开发环境配置.doc

第1页 / 共4页
第2页 / 共4页
第3页 / 共4页
第4页 / 共4页
资料共4页,全文预览结束
Windows 下的 pixhawk 环境搭建 官网详细介绍:http://ardupilot.org/dev/docs/editing-the-code-with-eclipse.html 一、安装前系统环境配置 1.安 装 JDK, 下 载 地 址 https://www.java.com/en/ 。 配 置 JDK 环 境 变 量 , 参 见 网 址 : http://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.html. 2.安装 eclipse 选择 C/C++编译环境 二、下载源码并使用 make 搭建 Pixhawk 的 ArduPilot 1.安装 github,在本地创建源码开发目录 2.从 https://github.com/ArduPilot/ardupilot 克隆源码到本地磁盘仓库 3.安装 gitbash,打开后使用命令进入源码目录输入以下命令 git config --global core.autocrlf false(是两个横线) git submodule update --init --recursive(是两个横线) 4 安 装 PX4 tools/pixhawk_toolchain_installer_latest.exe toolchain , 下 载 网 址 http://firmware.ap.ardupilot.org/Tools/PX4- 安装完之后打开 PX4Console 进入源码目录编译命令如下: 三、使用 eclipse 搭建 pixhawk 工程 使用已安装好的 PX4 toolchain 工具下的 PX4 Eclipse 链接启动 Eclipse 1.使用模板创建工程 打开 File --Import--General--Existing--Projects into Workspace--Select root directory-- browse--选择源码目录--Finsh
2.以新建的方式创建工程 打开 File--New--Make Project with Existing Code,在弹出对话框写入工程名和路径 C/C++打钩,选择 Cross Gcc 后点击 Finsh
3.置空白页代替支付表 打开 Window--Preferences--General--Editors--Text Editors--Insert spaces for tabs. 打开 C/C++--Code Style--Formatter --new--Profile name(“K&R Tab”)--space only 4.指定构建位置 Project Explorer--右击--选择 Properties--C/C++Build--Build location--设置构建目录
5.使 eclipse 编译 使用绿色圆圈和锤子来编译,举例如下:
分享到:
收藏