Make編譯Ardupilot源碼的兩種方法


編譯環境准備

​ Ardupilot源碼下載和PX4 toolchain工具鏈下載

​ (見https://www.cnblogs.com/BlogsOfLei/p/7707485.html)

注意:最新版本的github已經支持下載工程項目中的子模塊。如果喜歡git bash終端指令下載,可見:

https://www.cnblogs.com/BlogsOfLei/p/8624650.html

終端編譯

​ 打開終端PX4 Console,進入固件對用的文件下。此處以編譯四旋翼固件為例,如下圖:

​ make px4-v2編譯選項,選擇編譯px4-v2固件,回車確定,等待編譯完成。編譯成功得到的固件在ArduCopter文件下,名稱為***.px4。

編譯選項說明

make px4-v2 Build the Pixhawk firmware for a quad
make px4-v3 Build The Cube firmware for a quad
make px4-v4 Build the PixRacer firmware for quad
make px4 Build both PX4 (obsolete) and PixHawk firmware for a quadcopter
make clean “clean” the ardupilot directory
make px4-clean “clean” the PX4Firmware and PX4NuttX directories so the next build will completely rebuild them
make px4-cleandep “clean” .d and .o files from the PX4Firmware and PX4NuttX directories. faster but less complete rebuild compared to “px4-clean”
make px4-v2-upload Build and upload the Pixhawk firmware for a quad (i.e. no need to upload using a ground station)

Eclipse 編譯

  

  • 新加編譯選項

  

  • 點擊編譯選項進行編譯,等待編譯完成。編譯成功后,生成的目標文件位於ArduCopter目錄文件下,格式為***.px4。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM