码迷,mamicode.com
首页 > Windows程序 > 详细

Cygwin工具编译Ardupilot方法

时间:2019-01-16 11:39:17      阅读:697      评论:0      收藏:0      [点我收藏+]

标签:lang   ane   symbol   can   gnome   conf   control   zip   esc   

注意:该编译方法生成的固件基于Chibios系统,如果想要Nuttx系统固件,需采用make编译,步骤见make编译说明部分。

软件安装准备

  • 安装Cygwin

    技术分享图片

     

    • 在搜索框中搜索待安装的包,并点击skip按钮选择安装版本,选择成功后bin选择被打钩,表示选择安装有效。依次搜索下表中的包,并选择安装有效。全被选择完成之后,点击下一步进行安装(下载包和安装包过程需要一段比较长的时间,需耐心等待)。

    技术分享图片

     

    Package NameCategory / Name / Description
    autoconf Devel | autoconf: Wrapper scripts for autoconf commands
    automake Devel | automake: Wrapper scripts for automake and aclocal
    ccache Devel | ccache: A C compiler cache for improving recompilation
    gcc-g++ Devel | gcc-g++ GNU Compiler Collection (C++)
    git Devel | git: Distributed version control system
    libtool Devel | libtool: Generic library support script
    make Devel | make: The GNU version of the ‘make’ utility
    gawk Interpreters | gawk: GNU awk, a pattern scanning and processing language
    libexpat-devel Libs | libexpat-devel: Expat XML parser library (development files)
    libxml2-devel Libs | libxml2-devel: Gnome XML library (development)
    libxslt-devel Libs | libxslt-devel: XML template library (development files)
    python2-devel Python | python2-devel: Python2 language interpreter (python3 does not work yet)
    python2-future Python | python2-future: Clean single-source support for Python 3 and 2
    python2-libxml2 Python | python2-libxml2: Gnome XML Library (Python bindings
    python2-pip Python | python2-pip: Python package installation tool
    procps-ng System | procps-ng: System and process monitoring utilities (required for pkill)
    gdb Devel | gdb: The GNU Debugger
    ddd Devel | ddd: DDD, the data display debugger
    zip Archive | zip: Info-ZIP compression utility
  • 打开Cygwin64 Terminal(从桌面快捷方式或者开始菜单中打开),输入以下指令安装依赖的python组件包。

      pip2 install empy
    ?
      pip2 install pyserial
    ?
      pip2 install pymavlink

技术分享图片

 

编译目标程序

  • 打开Cygwin64 Terminal,进入Ardupilot工程目录下

  • 查看能编译目标板指令

    ./waf list_boards

技术分享图片

 

  • 配置目标板,以下列出常用的配置目标板指令:

    ./waf configure --board bebop --static # Bebop or Bebop2
    ./waf configure --board edge           # emlid edge
    ./waf configure --board fmuv3          # Pixhawk2/Cube using ChibiOS
    ./waf configure --board fmuv4          # Pixracer using ChibiOS
    ./waf configure --board navio2         # emlid navio2
    ./waf configure --board Pixhawk1       # Pixhawk1
    ./waf configure --board CubeBlack      # Pixhawk2
    ./waf configure --board Pixracer       # Pixracer
    ./waf configure --board skyviper-v2450 # SkyRocket‘s SkyViper GPS drone using ChibiOS
    ./waf configure --board sitl           # software-in-the-loop simulator
    ./waf configure --board sitl --debug   # software-in-the-loop simulator with debug symbols

    此处编译pixhawk1为例。输入指令./waf configure --board Pixhawk1注意区分大小写。

    技术分享图片

     

  • 编译目标指令。输入以下指令编译四旋翼固件,固件格式为apj和bin,其中apj可通过MissionPlaner地面站烧写至目标板。

    ./waf --targets bin/arducopter

     技术分享图片

     

关于waf编译详细说明请见文档:https://github.com/ArduPilot/ardupilot/blob/master/BUILD.md

Cygwin工具编译Ardupilot方法

标签:lang   ane   symbol   can   gnome   conf   control   zip   esc   

原文地址:https://www.cnblogs.com/BlogsOfLei/p/10275708.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!