在linux使用make编译ArduPilot for Pixhawk/PX4 ArduPilot 编译环境搭建
Building ArduPilot for Pixhawk/PX4 on Linux with Make
使用Make编译 ArduPilot for Pixhawk 2, Pixhawk and PX4 在linux上.
Note: 编译 Pixhawk 2 and Pixhawk使用 (make px4-v2). 编译 PX4 使用 make px4-v1.
Quick start
系统ubuntu16.04
Setup
安装 git:
sudo apt-get -qq -y install git
安装 arm-none-eabi-gcc编译器

安装gawk,cmake
apt-get install gawk cmake
克隆源码到本地:
git clone https://github.com/diydrones/ardupilot.git
运行ubuntu安装脚本:
ardupilot/Tools/scripts/install-prereqs-ubuntu.sh -y
Reload the path (log-out and log-in to make permanent):
. ~/.profile
Build 编译
以下是编译不同机型 Pixhawk2/Pixhawk 的命令. 编译PX4使用make px4-v2 而不是make px4-v1
To build for PX4 replace make px4-v2 with make px4-v1.
Build for Copter:
cd ardupilot/ArduCopter
make px4-v2
编译过程中出现的问题:

在github上的matrix目录名已经变化,所以找不到,手动git clone下载即可

之后又出现的问题是:
少python-empy,pip,catkin-pkg,直接使用apt-get install 安装即可

按照提示少哪个就安装哪个
又出现问题:genromfs没有找到
直接apt-get install genromfs

最后编译成功,生成px4固件文件

Build for Plane:
cd ardupilot/ArduPlane
make px4-v2
Build for Rover:
cd ardupilot/APMrover2
make px4-v2
Build for Antenna Tracker:
cd ardupilot/AntennaTracker
make px4-v2
Building
One you have the 3 git trees and compiler setup you do the build in your vehicle directory. For example, if building Plane then do this:
cd ardupilot/ArduPlane
make px4
That will build two files ArduPlane-v1.px4 and ArduPlane-v2.px4. The v1 file is for PX4v1, the v2 file is for PX4v2 (the Pixhawk).
你可以只编译一个使用 “make px4-v1” or “make px4-v2”.
The first time you build it will take quite a long time as it builds the px4 archives. Subsequent builds will be faster (especially if you setup ccache correctly).
Loading firmware
To load the firmware onto the board use
make px4-v1-upload
or
make px4-v2-upload
After it says “waiting for bootloader” plugin your PX4 on USB.
If upload consistently fails in the erase step then check if you are running ‘modemmanager’ which can take control of the PX4 USB port. Removing modemmanager can help.
Cleaning
If there have been updates to the PX4NuttX or PX4Firmware git submodules you may need to do a full clean build. To do that use:
make px4-clean
that will remove the PX4NuttX archives so you can do a build from scratch
在linux使用make编译ArduPilot for Pixhawk/PX4 ArduPilot 编译环境搭建的更多相关文章
- Spark入门实战系列--2.Spark编译与部署(上)--基础环境搭建
[注] 1.该系列文章以及使用到安装包/测试数据 可以在<倾情大奉送--Spark入门实战系列>获取: 2.Spark编译与部署将以CentOS 64位操作系统为基础,主要是考虑到实际应用 ...
- Linux移植到自己的开发板(一)环境搭建
环境搭建 vmware:VMware Workstation 15 Pro Linux系统:Ubuntu16.04 x64 1. 在Windows系统安装VMware15软件: 2. 网上下载并解压u ...
- Linux巩固记录(3) hadoop 2.7.4 环境搭建
由于要近期使用hadoop等进行相关任务执行,操作linux时候就多了 以前只在linux上配置J2EE项目执行环境,无非配置下jdk,部署tomcat,再通过docker或者jenkins自动部署上 ...
- Linux 4.10.8 根文件系统制作(一)---环境搭建
一.工具 制作工具为busybox 下载地址:https://busybox.net/ 解压: 二.制作文件系统 进入目录,执行make menuconfig: 2.1 busybox setting ...
- kali linux 入门(1) 基于win10和docker的环境搭建
1. 前言 渗透测试并没有一个标准的定义.国外一些安全组织达成共识的通用说法是,渗透测试是通过模拟恶意黑客的攻击方法,来评估计算机网络系统安全的一种评估方法,这个过程包括对系统的任何弱点.技术缺陷或漏 ...
- Android开发环境搭建 for windows (linux类似) 详细可参考“文件”中“Android开发环境搭建.pdf ”
ADT-Bundle for Windows 是由Google Android官方提供的集成式IDE,已经包含了Eclipse,你无需再去下载Eclipse,并且里面已集成了插件,它解决了大部分新手通 ...
- pixhawk在linux(ubuntu16.04)下的开发环境搭建和源码编译
1查找安装文档(http://dev.px4.io/starting-installing-linux.html)(本文仅针对硬件为PIXHAWK的开发环境搭建,其他硬件请参考官方文档) ...
- 【转】Linux(ubuntu14.04)上编译Android4.4源码的环境搭建及编译全过程
原文网址:http://jileniao.net/linux-android-building.html sublime text让我伤心.本来很信任sublime text的自动保存功能,之前使用一 ...
- linux下安卓编译apk环境搭建
ubuntu下linux安卓编译环境搭建. 配置好编译环境 (前提是已经安装了jdk,可以用java -verison 命令查看) 一.设置环境变量 用vi ~/.bashrc 打开编译环境 JA ...
随机推荐
- Dubai Princess and Prince!
萨拉玛公主,生于1999年 哈曼丹王子 玛丽亚姆公主,出生于1991年
- Git常用命令速查表
- asp.net lodop单个打印
1.首先在列表页面增加以下代码 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind=&quo ...
- python调用zabbix接口实现Action配置
要写这篇博客其实我的内心是纠结的,老实说,我对zabbix的了解实在不多.但新公司的需求不容置疑,当我顶着有两个头大的脑袋懵懵转入运维领域时,面前摆着两百多组.上千台机器等着写入zabbix监控的需求 ...
- python——操作Redis
在使用django的websocket的时候,发现web请求和其他当前的django进程的内存是不共享的,猜测django的机制可能是每来一个web请求,就开启一个进程去与web进行交互,一次来达到利 ...
- C#编码规范 转 http://www.cnblogs.com/wulinfeng/archive/2012/08/31/2664720.html
C#编码规范 1 规范目的 ……………………………………………………… 3 2 适用范围 ……………………………………………………… 3 3 代码注释 ………………………………………………… ...
- 20169212《Linux内核原理与分析》第四周作业
Linux第四周作业 1. 堆栈知识 首先回顾了下堆栈相关的知识,堆栈机制是高级语言可以运行的一个基础,这一块需要重点掌握.函数发生调用时,如图 call指令:将eip的按顺序执行的下一条指令(因为在 ...
- HTTP 错误 500.21 - Internal Server Error
HTTP 错误 500.21 - Internal Server Error 处理程序“PageHandlerFactory-Integrated”在其模块列表中有一个错误模块“ManagedPipe ...
- java入门笔记
1.安装路径:不能含空格和中文,建议安装路径d:\java\jdk 2.名词 bin:binary javac:java compile java:运行java文件 3.命名: (1)尽量用英 ...
- C# winform中读取HTML代码
这次的任务是在winform建立一个表格,表格第一列需要绑定数据,表格的第一行也需要绑定数据,而其他的单元格数据则是根据对应的行数据和列数据进行提取. 询问过后,需要在后台拼接HTML代码实现这个功能 ...