Cygwin工具编译Ardupilot方法

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

软件安装准备

  • 安装Cygwin

     

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

     

    Package NameCategory / Name / Description
    autoconfDevel | autoconf: Wrapper scripts for autoconf commands
    automakeDevel | automake: Wrapper scripts for automake and aclocal
    ccacheDevel | ccache: A C compiler cache for improving recompilation
    gcc-g++Devel | gcc-g++ GNU Compiler Collection (C++)
    gitDevel | git: Distributed version control system
    libtoolDevel | libtool: Generic library support script
    makeDevel | make: The GNU version of the ‘make’ utility
    gawkInterpreters | gawk: GNU awk, a pattern scanning and processing language
    libexpat-develLibs | libexpat-devel: Expat XML parser library (development files)
    libxml2-develLibs | libxml2-devel: Gnome XML library (development)
    libxslt-develLibs | libxslt-devel: XML template library (development files)
    python2-develPython | python2-devel: Python2 language interpreter (python3 does not work yet)
    python2-futurePython | python2-future: Clean single-source support for Python 3 and 2
    python2-libxml2Python | python2-libxml2: Gnome XML Library (Python bindings
    python2-pipPython | python2-pip: Python package installation tool
    procps-ngSystem | procps-ng: System and process monitoring utilities (required for pkill)
    gdbDevel | gdb: The GNU Debugger
    dddDevel | ddd: DDD, the data display debugger
    zipArchive | 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

转载于:https://www.cnblogs.com/BlogsOfLei/p/10275708.html

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值