# Adding new Airframe to PX4 and QGC

**URL:** <https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966>\
**Category:** PX4 Autopilot\
**Created:** [August 17, 2016, 7:58pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966 "2016-08-17T19:58:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pziyang](https://discuss.px4.io/user_avatar/discuss.px4.io/pziyang/32/8678_2.png) [@pziyang](https://discuss.px4.io/u/pziyang)\
**Post date:** [August 17, 2016, 7:58pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/1 "2016-08-17T19:58:25Z")

</div>

Hi all,

I followed the guide ([http://dev.px4.io/airframes-adding-a-new-frame.html](http://dev.px4.io/airframes-adding-a-new-frame.html)) to add a new custom airframe configuration).

The configuration file is stored as /Firmware/ROMFS/px4fmu\_common/init.d/2107\_xhalerrv,  
and the mixer file as /Firmware/ROMFS/px4fmu\_common/init.d/xhale\_rrv.main.mix

(BTW what does the numbering convention mean?)

![](https://discuss.px4.io/uploads/default/original/1X/527d25683a23b4eebab5a506ccdcd2147d3c4a18.PNG)

I compiled the firmware and uploaded to my Pixhawk using  
`make px4fmu-v2_default upload`

![](https://discuss.px4.io/uploads/default/original/1X/48992759fae7774e6bfbfa85bc52f268092126f0.PNG)

How do I select in QGC? I do not see this custom airframe appearing in any dropdown box when selecting airframe. Do I have edit a configuration file somewhere? Also, can I make this airframe configuration the “default” on boot?

Platform/Configuration:  
px4 ( git branch v1.4.1 )  
QGC 3.0.0 ( Running on Windows )  
Linux Ubuntu 12.04 LTS

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![Bart](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/f19dbf/32.png) [@Bart](https://discuss.px4.io/u/Bart)\
**Post date:** [August 17, 2016, 8:10pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/2 "2016-08-17T20:10:34Z")

</div>

QGroundControl loads ~/.config/QGroundControl/PX4AirframeFactMetaData.xml. I’m not sure what the location is on windows.  
If you compile PX4, it generates an airframes.xml file. If you replace the original with the compiled one, it should be visible in QGC.

---

<div class="post-metadata">

**Author:** ![LorenzMeier](https://discuss.px4.io/user_avatar/discuss.px4.io/lorenzmeier/32/17_2.png) [@LorenzMeier](https://discuss.px4.io/u/LorenzMeier)\
**Post date:** [August 17, 2016, 8:17pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/3 "2016-08-17T20:17:13Z")

</div>

The simple way to do this is to flash the binary through QGC, which updates the file.

---

<div class="post-metadata">

**Author:** ![pziyang](https://discuss.px4.io/user_avatar/discuss.px4.io/pziyang/32/8678_2.png) [@pziyang](https://discuss.px4.io/u/pziyang)\
**Post date:** [August 17, 2016, 8:32pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/4 "2016-08-17T20:32:15Z")

</div>

I am compiling on my linux development workstation while I am running QGC on a ruggedized windows laptop (which will be brought outdoor for flight testing).

Is there a way to do development/compiling on linux, while making it work on QGC (running on a separate windows computer?)

Thanks all for your fast response!

Ziyang

---

<div class="post-metadata">

**Author:** ![pziyang](https://discuss.px4.io/user_avatar/discuss.px4.io/pziyang/32/8678_2.png) [@pziyang](https://discuss.px4.io/u/pziyang)\
**Post date:** [August 17, 2016, 9:09pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/5 "2016-08-17T21:09:45Z")

</div>

Update, it is working!

So I compiled the firmware on Linux, copied the binaries to the windows laptop (which will be running QGC). Then, I flashed using the compiled firmware using QGC. After applying and restarting, the entry appeared on QGC!

![](https://discuss.px4.io/uploads/default/original/1X/dd732a4de1697138dac3b4fcf969dad813cdc1f7.PNG)

As for Bart’s suggestion, I think the file resides in User\AppData\Roaming\QGroundControl.org. This file is generated by uploading the custom firmware as detailed above.

Hope it helps. Perhaps @LorenzMeier can add a note about it in the dev guide. Maybe I’m new but this wasn’t too clear.

Thanks again!

Ziyang

---

<div class="post-metadata">

**Author:** ![garlinplus](https://discuss.px4.io/user_avatar/discuss.px4.io/garlinplus/32/271_2.png) [@garlinplus](https://discuss.px4.io/u/garlinplus)\
**Post date:** [August 19, 2016, 1:05pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/6 "2016-08-19T13:05:49Z")

</div>

hi,gay. can the new airframe you add work correctly?

---

<div class="post-metadata">

**Author:** ![pziyang](https://discuss.px4.io/user_avatar/discuss.px4.io/pziyang/32/8678_2.png) [@pziyang](https://discuss.px4.io/u/pziyang)\
**Post date:** [August 22, 2016, 9:14pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/7 "2016-08-22T21:14:18Z")

</div>

I have not flown it yet, but in ground test (in MANUAL mode) the passthrough for the servo signals works as expected.

---

<div class="post-metadata">

**Author:** ![pziyang](https://discuss.px4.io/user_avatar/discuss.px4.io/pziyang/32/8678_2.png) [@pziyang](https://discuss.px4.io/u/pziyang)\
**Post date:** [August 22, 2016, 9:24pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/8 "2016-08-22T21:24:01Z")

</div>

Although strangely, I get duplicate entries in QGC interface as well as PX4AirframeFactMetaData.xml

 ![](https://discuss.px4.io/uploads/default/original/1X/e0f01358a63844438fd005dae7dcd29bce6e0670.png)  
 ![](https://discuss.px4.io/uploads/default/original/1X/0f286a8246cf6ffa317c6d8d99b43d979315c806.png)

---

<div class="post-metadata">

**Author:** ![saryee](https://discuss.px4.io/user_avatar/discuss.px4.io/saryee/32/4910_2.png) [@saryee](https://discuss.px4.io/u/saryee)\
**Post date:** [August 25, 2016, 2:05am UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/9 "2016-08-25T02:05:43Z")

</div>

@LorenzMeier You mentioned “flash the binary through QGC”. Do you mean .px4 file or .bin file? If .bin file, how to flash it? Thanks!

---

<div class="post-metadata">

**Author:** ![pziyang](https://discuss.px4.io/user_avatar/discuss.px4.io/pziyang/32/8678_2.png) [@pziyang](https://discuss.px4.io/u/pziyang)\
**Post date:** [August 25, 2016, 2:32pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/10 "2016-08-25T14:32:12Z")

</div>

I flashed using the px4 file in /build\_px4fmu-v2\_default/src/firmware.

Can someone explain exactly which files are needed?

I put firmware\_nuttx, firmware\_nuttx.bin and nuttx-px4fmu-v2-default.px4 in the same directory (and the flash seems to work), Does it need any other files/libraries?

---

<div class="post-metadata">

**Author:** ![NJG](https://discuss.px4.io/letter_avatar_proxy/v4/letter/n/43a26b/32.png) [@NJG](https://discuss.px4.io/u/NJG)\
**Post date:** [September 3, 2016, 1:01pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/11 "2016-09-03T13:01:02Z")

</div>

I think only nuttx-px4fmu-v2-default.px4 is needed. It works for me.

---

<div class="post-metadata">

**Author:** ![aokholm](https://discuss.px4.io/user_avatar/discuss.px4.io/aokholm/32/3540_2.png) [@aokholm](https://discuss.px4.io/u/aokholm)\
**Post date:** [January 3, 2017, 1:50pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/12 "2017-01-03T13:50:55Z")

</div>

> [@Bart](#):
>
> QGroundControl loads ~/.config/QGroundControl/PX4AirframeFactMetaData.xml. I’m not sure what the location is on windows.If you compile PX4, it generates an airframes.xml file. If you replace the original with the compiled one, it should be visible in QGC.

This piece of information in the Airframe development guide would have been very useful!

---

<div class="post-metadata">

**Author:** ![Bart](https://discuss.px4.io/letter_avatar_proxy/v4/letter/b/f19dbf/32.png) [@Bart](https://discuss.px4.io/u/Bart)\
**Post date:** [January 3, 2017, 4:29pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/13 "2017-01-03T16:29:38Z")

</div>

Well, it also works for me if I upload the .px4 file through QGroundControl. You just have to make sure to restart QGroundControl after you flashed the new firmware, otherwise it doesn’t show.

---

<div class="post-metadata">

**Author:** ![aokholm](https://discuss.px4.io/user_avatar/discuss.px4.io/aokholm/32/3540_2.png) [@aokholm](https://discuss.px4.io/u/aokholm)\
**Post date:** [January 3, 2017, 4:36pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/14 "2017-01-03T16:36:19Z")

</div>

Sure, it worked with a upload through QGroundControl for me as well. To me it was just natural to do the flashing using the make command, just after making a new build 🙂

---

<div class="post-metadata">

**Author:** ![vance86](https://discuss.px4.io/letter_avatar_proxy/v4/letter/v/c67d28/32.png) [@vance86](https://discuss.px4.io/u/vance86)\
**Post date:** [April 13, 2017, 8:16am UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/15 "2017-04-13T08:16:46Z")

</div>

Would someone please elaborate on the process of “flashing the binary”. Which file do I need exactly and how do I do it? I have gotten as far as the original post but am unable to get it to appear in QGC. Thanks

 ![](https://discuss.px4.io/uploads/default/original/1X/eba195b31c439d664ad68fd06482a6907d4e0366.png)

---

<div class="post-metadata">

**Author:** ![pziyang](https://discuss.px4.io/user_avatar/discuss.px4.io/pziyang/32/8678_2.png) [@pziyang](https://discuss.px4.io/u/pziyang)\
**Post date:** [April 13, 2017, 12:50pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/16 "2017-04-13T12:50:27Z")

</div>

in folder build\_px4fmu-v2\_default/src/firmware/nuttx

select this file in QGC custom firmware option: nuttx-px4fmu-v2-default.px4

---

<div class="post-metadata">

**Author:** ![vance86](https://discuss.px4.io/letter_avatar_proxy/v4/letter/v/c67d28/32.png) [@vance86](https://discuss.px4.io/u/vance86)\
**Post date:** [April 13, 2017, 7:12pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/17 "2017-04-13T19:12:23Z")

</div>

still no luck. My file is here: (10609)

 ![](https://discuss.px4.io/uploads/default/original/1X/a2945d2e532808b2deeb7654cd5170d1bbb82e7b.png)file:///home/vance/Pictures/Screenshot%20from%202017-04-13%2014-59-00.png

It looks like this :

 ![](https://discuss.px4.io/uploads/default/original/1X/95e10f97a078a0f75b044400fbaadce6fc9cadeb.png)file:///home/vance/Pictures/Screenshot%20from%202017-04-13%2014-59-55.png

I grab px4fmu-v2\_default.px4 from here after building:

 ![](https://discuss.px4.io/uploads/default/original/1X/be2580f7d8a494c1de07efab4be0a6eaf1708a17.png)

I upload that with custom firmware option in QGC, close, and reopen. Still no option use my airframe.

I did see that the MetaDatafile does NOT include my airframe after flashing.

Any ideas?

---

<div class="post-metadata">

**Author:** ![pziyang](https://discuss.px4.io/user_avatar/discuss.px4.io/pziyang/32/8678_2.png) [@pziyang](https://discuss.px4.io/u/pziyang)\
**Post date:** [April 13, 2017, 10:33pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/18 "2017-04-13T22:33:15Z")

</div>

are you flashing from linux or windows?

This is what I have done

1. compile on work machine running linux (make px4fmu-v2\_default)
2. copy out the entire build\_px4fmy-v2\_default/src/firmware/nuttx folder to windows laptop running QGC 3.1.3
3. click firmware, select custom firmware option. Point it to px4fmu-v2\_default.px4
4. Restart QGC. It should be there.

I literally repeated the steps 5 mins ago. You can skip step 2 if you’re using the same machine to compile and flash

---

<div class="post-metadata">

**Author:** ![vance86](https://discuss.px4.io/letter_avatar_proxy/v4/letter/v/c67d28/32.png) [@vance86](https://discuss.px4.io/u/vance86)\
**Post date:** [April 13, 2017, 11:45pm UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/19 "2017-04-13T23:45:40Z")

</div>

I must be missing a step previous to these but I am not sure what it could possibly be. There don’t seem to be that many steps in this process. I have two operating systems on my laptop, LInux and Windows. I have tried building and flashing in Linux. I also tried building in Linux and flashing on my Windows version of QGC just to try duplicating your process exactly. The new airframe never shows up. The init.d file has a unique name, unique type, unique mixer file. What else am I missing?

Thanks for all of your help

---

<div class="post-metadata">

**Author:** ![vance86](https://discuss.px4.io/letter_avatar_proxy/v4/letter/v/c67d28/32.png) [@vance86](https://discuss.px4.io/u/vance86)\
**Post date:** [April 15, 2017, 3:18am UTC](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966/20 "2017-04-15T03:18:01Z")

</div>

Teammate figured it out! I don’t know why, but it was necessary to delete the build folder before running make px4fmu-v2\_default. This fresh build included the new init.d file.

[Next page](https://discuss.px4.io/t/adding-new-airframe-to-px4-and-qgc/966.md?page=2)
