Skip to content
adrnp edited this page Apr 4, 2015 · 7 revisions

PX4 Development Environment Setup for AA241x

Please follow the instructions for your operating system in order to setup the PX4 environment.

Windows

  1. Download and run the PX4 installer for windows.

    Note: if you do not have Java installed, please install Java as it is needed to run Eclipse (comes with installer).

  2. In the newly created programs menu, PX4 Toolchain, open up the PX4 Console.

    Assuming the toolchain was installed with a default path, this should open you to a console with path /c/px4/

  3. Run the following code to download the source code from git:

     git clone https://github.com/adrnp/Firmware.git
     cd Firmware
     git checkout aa241x
     git submodule init
     git submodule update
    
  4. Start eclipse downloaded with the toolchain via: Start -> All Programs -> PX4Toolchain -> PX4 eclipse.

    it is important you always start eclipse in this way for px4 code development!!!

  5. The proposed workspace path is fine, and feel free to check if you don't want to get asked about this every time.

  6. To set up the project go to File -> New -> Makefile Project with Existing Code

  7. Browse for the folder c:\px4\Firmware (if you downloaded the source code into the default location). Choose Cross GCC for the list of Toolchain for Indexer Settings.

  8. On the right hand side of the window open the Make Target tab and press on New Make Target and create the following targets:

  • archives

  • distclean

  • clean

  • px4fmu-v2_aa241x

  • upload px4fmd-v2_aa241x

    For those who want to speed up the make process and have a multicore cpu, feel free to instead of px4fmu-v2_aa241x create the target -j4 px4fmu-v2_aa241x where the 4 in -j4 should be changed to be the number of cores you would like to make with.

  1. That's it for setting up the development environment, please read the source code overview and flashing firmware documents to figure out where it is your code goes and how to get it installed on the pixhawk.

Mac

  1. Follow these PX4 Build Environment instructions up to the OpenOCD JTAG Adapter section (you do not need to go beyond that point).

  2. Follow these PX4 Toolchain Installation instructions up until the Source/Firmware Download instructions.

  3. Open a console, make a folder for your source code and download the code from github

     mkdir ~/src
     cd ~/src/
     git clone https://github.com/adrnp/Firmware.git
     cd Firmware
     git checkout aa241x
     git submodule init
     git submodule update
    
  4. That's it for setting up the development environment, please read the source code overview and flashing firmware documents to figure out where it is your code goes and how to get it installed on the pixhawk.

Linux

  1. Follow these PX4 Build Environment instructions.

  2. Follow these PX4 Toolchain Installation instructions up until the Source/Firmware Download instructions.

  3. Open a console, make a folder for your source code and download the code from github

     mkdir ~/src
     cd ~/src/
     git clone https://github.com/adrnp/Firmware.git
     cd Firmware
     git checkout aa241x
     git submodule init
     git submodule update
    
  4. That's it for setting up the development environment, please read the source code overview and flashing firmware documents to figure out where it is your code goes and how to get it installed on the pixhawk.

Clone this wiki locally