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. mybatis if test 不为空字符串或null

    <if test="type !=null and type !=''"> AND l.type=#{type,jdbcType=INTEGER} </if> ...

  2. echarts图表第一个案例

    1.action中获取到数据 @Override public String execute() throws Exception { List<Student> find = echar ...

  3. laravel cookie写入

            $cookie = cookie('cookie_name', 'value', 5);        $data = ['title'=>'hello world'];     ...

  4. web网站 Vs 移动App 谁更能打动你?之 产品经理篇

    从web1.0到web2.0,由单调变为丰富——无论是内容,呈现,还是用户交互,当我们(接触互联网只有五六年的人)可能还沉浸在这绚丽多彩,啧啧称奇web交互体验之中,移动App不知道在什么时候已经悄然 ...

  5. 动态拼接linq 使用Expression构造动态linq语句

    最近在做动态构造linq语句,从网上找了很多,大多数,都是基于一张表中的某一个字段,这样的结果,从网上可以搜到很多.但如果有外键表,需要动态构造外键表中的字段,那么问题来了,学挖掘机哪家强?哦,不是, ...

  6. placeholder 使用

    这个属性是用于INPUT当中. 实现效果: 1.鼠标点击进入<input type='buttom' placeholder='用户名'> 2.用户名内容消失:不在使用以前的Value,来 ...

  7. Adapter 启动时报错——2

    在安装tibco adr3  7.00以前的版本,在designer中启动adr3 会报出“无法加载adr3.dll”文件的错误,这是因为在designer中的palettes默认是指向adapter ...

  8. uva 213 Message Decoding

    思路来自紫书...开始时的思路估计100行+,果断放弃!关键:1.正确提取出函数!   initmap():初始化字母与整数的映射.   returnint(x):向后读取x位,并转换为十进制数返回. ...

  9. app标配控制器:UITabBarController

    UITabBarController UITabBarController和UINavigationController类似可以轻松的管理多个控制器,底部有一个条,底部条tabBar的高度是49. U ...

  10. Java冒泡随笔

    package homework; import java.util.Scanner; public class ArraySort { /** * @param args */ public sta ...