Skip to content

Compiling and Uploading Code

msberk edited this page Apr 14, 2016 · 5 revisions

First you need to clone my repo: https://github.com/msberk/Firmware

And switch to the aa241x_2016 branch. This is the main branch you should be building off of for your own custom firmwares, so even if you use your own remote repository make sure to keep my repo as a remote to check for updates (though I plan to announce on #pixhawk when updates occur).

If no one on your team knows git at all, you can talk to me for getting started though I recommend reading this guide first: Git Official Docs and Guide

or this one: Git - The simple guide

Console

This is for Mac, Linux and Windows using the PX4 console. Please follow the following steps:

  1. Navigate to your Firmware directory

  2. make the code:

     make px4fmu-v2_default
    
  3. Upload the code (do not plug in the pixhawk until instructed to do so by the build process)

    Run the following to begin the compiling and upload process

     make px4fmu-v2_default upload
    

Some notes on building the code:

  • when you simply modify code in the existing files, you simply need to rerun

     make px4fmu-v2_default upload
    

    if you want to immediately upload the updates. If you simply want to check to see if you added no errors, run

     make px4fmu-v2_default
    
  • If you have added files to the code, you must clean the directory before you rebuild the firmware, so you will need to execute the following:

     make clean
     make px4fmu-v2_default (or make upload if you want to upload immediately)
    
Clone this wiki locally