Px4 code compile/build


How to compile/build px4 firmware for specific vehicle?
I wanted to compile/build firmware for Copter.
I searched everywhere but i didn’t get regarding this.

Thank you

You compile for a specific board, not a vehicle.
The vehicle is selected in QGC, and then the startup script does everything for you.
You can exclude specific modules from compilation if you don’t need them, but for a simple setup, you don’t need to do that.

But in QGC there is pre-compiled binary file for specific vehicle which is we generally flash, am I right?.

But i want to compile just like ardupilot firmware.

ArduPilot has (some) different source and different binaries for each vehicle type, so they need to have, say copter-specific binaries for each board. PX4 generally has all frames in one binary per-board. So you just install the one binary and then select the airframe.