Installing px4 with local custom firmware file

Hello , i am going to flasboard my local builded PX4 version into my pixhawk 6x.
1 Must i first build with the command on my wsl2 ubuntu : make px4_fmu-v6x_default or qgc will do it automatically with the detected hardware via usb ?
2 For installing via customer file option in advanced settings , wich file i must select exactly ?
Thanks for help .

The easiest way to install the firmware you built is by using the command line. Make sure your hardware is connected via USB then try:

make px4_fmu-v6x upload

Instructions can be found here Building PX4 Software | PX4 Guide (main)

1 Like

Hello , the problem with the command line is that i am using linux under windows WSL2 and i am afraid it won’t work because WSL2 will not recocgnize the hardware connected via usb ( as joystciks for exemple) , it is a virtual machine. It is why i want to make it via Qgroundcontrol , do you have more details about it ? Wich file in the firmware i must select ect… ? Regards.

I know I was trying to flash on a Linux virtual machine running on Windows, and I always had some issues with the USB connection.
If I was doing it like that, I’d build in Linux, copy to Windows, and then through QGC running on Windows choose the firmware file to flash on the autopilot.

You can select custom firmware via QGC, follow the screenshots below:

Select advanced

Select Custom firmware file

Click OK

Find *.px4 file

@hamishwillee, I couldn’t find this on QGC / PX4 docs. Is it somewhere? If not, I can submit a PR.

Ok, so i must first exucute the line command → make px4_fmu-v6x_default on mu wsl2 in order to generate this .px4 file on my windows built px4 , then i must proceed via qgc for flasbording into to the hardwar , i am right ?

yes, you need to build PX4, then find the *.px4 file in the build directory

@rroche Yes, this is all documented.

If you’re and end user you find out about custom firmware upload through the main path of installing firmware: Loading Firmware | PX4 Guide (main)

IF you’re a developer you might find out about the upload option to make in “building PX4 docs”.

For WSL 2 though, you find out about it from Windows Development Environment (WSL2-Based) | PX4 Guide (main)

That basically says that to upload your PX4 firmware you need to use QGC on Windows and connect to the PX4 install running in WSL2.

There are mechanisms to connect direct to USB from within the WSL environment but I haven’t worked them out yet. When that exists you would be able to do the make with upload option.

I added Improve info on WSL2 flashing by hamishwillee · Pull Request #3474 · PX4/PX4-user_guide · GitHub to improve the cross linking and make this easier to find.