Uploading custom firmware on a Pixhawk

Hi,
I want to upload a custom firmware, essentially with an edit to the AP_HAL, so a slight edit in the code that I got on github. I wanted to know how can I flash that code on the pixhawk using Mission Planner?

You do not need mission planner . Just do

./waf copter --upload