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 编译环境搭建的更多相关文章

  1. Spark入门实战系列--2.Spark编译与部署(上)--基础环境搭建

    [注] 1.该系列文章以及使用到安装包/测试数据 可以在<倾情大奉送--Spark入门实战系列>获取: 2.Spark编译与部署将以CentOS 64位操作系统为基础,主要是考虑到实际应用 ...

  2. Linux移植到自己的开发板(一)环境搭建

    环境搭建 vmware:VMware Workstation 15 Pro Linux系统:Ubuntu16.04 x64 1. 在Windows系统安装VMware15软件: 2. 网上下载并解压u ...

  3. Linux巩固记录(3) hadoop 2.7.4 环境搭建

    由于要近期使用hadoop等进行相关任务执行,操作linux时候就多了 以前只在linux上配置J2EE项目执行环境,无非配置下jdk,部署tomcat,再通过docker或者jenkins自动部署上 ...

  4. Linux 4.10.8 根文件系统制作(一)---环境搭建

    一.工具 制作工具为busybox 下载地址:https://busybox.net/ 解压: 二.制作文件系统 进入目录,执行make menuconfig: 2.1 busybox setting ...

  5. kali linux 入门(1) 基于win10和docker的环境搭建

    1. 前言 渗透测试并没有一个标准的定义.国外一些安全组织达成共识的通用说法是,渗透测试是通过模拟恶意黑客的攻击方法,来评估计算机网络系统安全的一种评估方法,这个过程包括对系统的任何弱点.技术缺陷或漏 ...

  6. Android开发环境搭建 for windows (linux类似) 详细可参考“文件”中“Android开发环境搭建.pdf ”

    ADT-Bundle for Windows 是由Google Android官方提供的集成式IDE,已经包含了Eclipse,你无需再去下载Eclipse,并且里面已集成了插件,它解决了大部分新手通 ...

  7. pixhawk在linux(ubuntu16.04)下的开发环境搭建和源码编译

      1查找安装文档(http://dev.px4.io/starting-installing-linux.html)(本文仅针对硬件为PIXHAWK的开发环境搭建,其他硬件请参考官方文档)     ...

  8. 【转】Linux(ubuntu14.04)上编译Android4.4源码的环境搭建及编译全过程

    原文网址:http://jileniao.net/linux-android-building.html sublime text让我伤心.本来很信任sublime text的自动保存功能,之前使用一 ...

  9. linux下安卓编译apk环境搭建

    ubuntu下linux安卓编译环境搭建. 配置好编译环境 (前提是已经安装了jdk,可以用java -verison 命令查看) 一.设置环境变量 用vi  ~/.bashrc  打开编译环境 JA ...

随机推荐

  1. miniui datepicker 二次加工

    function onshowpopup(){ $(".mini-calendar-timespinner").css({"width":"180px ...

  2. curl上传图片文件

    为了优化网站,需要做静态化和,图片分离 暂时想到的方式是: 1,php//input  流方式上传到远程服务器 2,阿里云oss收费服务 3,curl上传图片 4,phpftp上传图片 5, 服务器同 ...

  3. Java-用switch判断季节

    import java.util.*;class Demo3 { public static void main(String[] args) { //需求 :输入一个月份 ,判断月份属于哪一个季节 ...

  4. js判断是否是微信浏览器

    <script type="text/javascript"> window.onload = function(){ if(isWeiXin()){ var p = ...

  5. ThinkPHP 3.2.3(四)架构之多层MVC

    一.模型(Model)层 1.ThinkPHP支持多层Model,不同的模型层都继承自系统的Model类.   2.模型的多层通过目录结构和命名规范区分. 例如:在某个项目设计中需要区分数据层.逻辑层 ...

  6. 基于KEIL4开发ARM9(S3C2440)的裸机程序

    本文主要介绍如何使用Keil4开发ARM9(S3C2440)裸机程序. 说明: 一.平台: 操作系统:Windows XP系统 KEIL版本:4.73 开发板:ARM9(S3C2440) 二.建立工程 ...

  7. javap反编译解释外部类直接使用内部类private字段的原理

    2016-07-04 15:56:39 我们都知道: 1.内部类可以直接访问外部类的private字段和方法: 2.非静态内部类持有外部类的引用: 3.外部类可以直接访问内部类的private字段和方 ...

  8. Bootstrap <基础八>图片

    Bootstrap 提供了三个可对图片应用简单样式的 class: .img-rounded:添加 border-radius:6px 来获得图片圆角. .img-circle:添加 border-r ...

  9. onethinkp导入excel

    /** * Excel导入函数 * @author crx349 */ if (!empty($_FILES)) { $config = array( 'maxSize' => 3145728, ...

  10. java开发连接Oracle 12c采用PDB遇到问题记录

    今天初次使用java连接Oracle 12c,遇到各种问题,为方便后续查询,在汇总了问题记录及解决方案如下. ORA-28040: No matching authentication protoco ...