Toolchain Installation

Installation Downloads

Installation

  • Install GIT for Windows (assuming the GIT was installed to the path, ‘C:\GIT’)
  • Install GIT GUI (this guide refers to the use of TortoiseGIT)
  • Install Java
  • Install Toolchain (assuming the toolchain was installed to the path, ‘C:\VRX’)
  • Istall DfuSe

Download Source Code

When installing the toolchain create the folder C:\VRX\workspace: this is the workspace directory used by Eclipse and you must put here all source code. For download all firmware you have to create, first, the directory “workspace/virtualrobotix”.

  • Download NuttX: clicking the right mouse button on the foldervirtualrobotix”, select the itemGit Clone…” from the menu and insert URL (https://github.com/virtualrobotix/vrbrain_nuttx.git) and Directory (C:\VRX\workspace\virtualrobotix\VRNuttX) into the form opened and then press Ok. Folder VRNuttX will be created and downloaded the source code.

GIT_clone_VRNuttX

  • Download ardupilot development version: clicking the right mouse button on the foldervirtualrobotix”, select the itemGit Clone…” from the menu and insert URL (https://github.com/virtualrobotix/ardupilot.git) and Directory (C:\VRX\workspace\virtualrobotix\ardupilot) into the form opened and then press Ok. Folder ardupilot will be created and downloaded the source code.
  • Download ArduCopter Stable version: clicking the right mouse button on the foldervirtualrobotix”, select the itemGit Clone…” from the menu and insert URL (https://github.com/virtualrobotix/ardupilot.git) and Directory (C:\VRX\workspace\virtualrobotix\ArduCopter-stable) into the form opened and then press Ok. Folder ArduCopter-stable will be created and downloaded the source code. Clicking the right mouse button on the folder ArduCopter-stable, select the item “TortoiseGIT” from the menu and “Switch/Checkout” from the submenu. Search and select into the “Branch” list the item “remote/origin/Copter-stable” and then press Ok.

GIT_Switch_Checkout

  • Download ArduPlane Stable version: clicking the right mouse button on the foldervirtualrobotix”, select the itemGit Clone…” from the menu and insert URL (https://github.com/virtualrobotix/ardupilot.git) and Directory (C:\VRX\workspace\virtualrobotix\ArduPlane-stable) into the form opened and then press Ok. Folder ArduPlane-stable will be created and downloaded the source code. Clicking the right mouse button on the folder ArduCopter-stable, select the item “TortoiseGIT” from the menu and “Switch/Checkout” from the submenu. Search and select into the “Branch” list the item “remote/origin/Plane-stable” and then press Ok.
  • Download APMrover2 Stable version: clicking the right mouse button on the foldervirtualrobotix”, select the itemGit Clone…” from the menu and insert URL (https://github.com/virtualrobotix/ardupilot.git) and Directory (C:\VRX\workspace\virtualrobotix\APMrover2-stable) into the form opened and then press Ok. Folder APMrover2-stable will be created and downloaded the source code. Clicking the right mouse button on the folder ArduCopter-stable, select the item “TortoiseGIT” from the menu and “Switch/Checkout” from the submenu. Search and select into the “Branch” list the item “remote/origin/Rover-stable” and then press Ok
  • Download Bootloader: clicking the right mouse button on the foldervirtualrobotix”, select the itemGit Clone…” from the menu and insert URL (https://github.com/virtualrobotix/VRX_Bootloader.git) and Directory (C:\VRX\workspace\virtualrobotix\Bootloader) into the form opened and then press Ok. Folder Bootloader will be created and downloaded the source code.

Configure Eclipse

You can start Eclipse with batch file “C:\VRX\toolchain\msys\1.0\px4_eclipse.bat”. It’s important to execute this batch file as administrator in Windows 7 and higher.
When Eclipse start asks to choose the directory of the workspace: select the directory “C:\VRX\workspace”
Eclipse_Select_Workspace
To set up the project go to File → New → Makefile Project with Existing Code

Choose Cross GCC and Browse for the folder “C:\VRX\workspace\virtualrobotix“.

This is the interface of Eclipse:

Now open the tab on the right “Make Target”, select the directory “VRNuttX” and press “New Make Target”.

You should create the following Targets:

  • archives: to build all NuttX archives. All the archives builded are copied into “Archives” directory. To build the archive for only a specific board, add the command:
    • archives BOARDS=vrbrain-v45: NuttX archives for VR Brain 4.5 with PPMSUM and SBUS
    • archives BOARDS=vrbrain-v45P: NuttX archives for VR Brain 4.5 with PWM IN
    • archives BOARDS=vrbrain-v51: NuttX archives for VR Brain 5.1 with PPMSUM and SBUS
    • archives BOARDS=vrbrain-v51P: NuttX archives for VR Brain 5.1 with PWM IN
    • archives BOARDS=vrbrain-v52: NuttX archives for VR Brain 5.2 with PPMSUM and SBUS
    • archives BOARDS=vrbrain-v52P: NuttX archives for VR Brain 5.2 with PWM IN
    • archives BOARDS=vrubrain-v51: NuttX archives for VR Micro Brain 5.1 with PPMSUM and SBUS
    • archives BOARDS=vrubrain-v51P: NuttX archives for VR Micro Brain 5.1 with PWM IN
    • archives BOARDS=vrubrain-v52: NuttX archives for VR Micro Brain 5.2 with PPMSUM and SBUS
  • all: to build all NuttX firmware. This is a basic firmware with all drivers and a shell to test all components. All the firmwares builded are copied into “Images” directory. To build the default NuttX firmware for only a specific board, add the command:
    • vrbrain-v45_default: default NuttX firmware for VR Brain 4.5 with PPMSUM and SBUS
    • vrbrain-v45P_default: default NuttX firmware for VR Brain 4.5 with PWM IN
    • vrbrain-v51_default: default NuttX firmware for VR Brain 5.1 with PPMSUM and SBUS
    • vrbrain-v52P_default: default NuttX firmware for VR Brain 5.1 with PWM IN
    • vrbrain-v52_default: default NuttX firmware for VR Brain 5.2 ith PPMSUM and SBUS
    • vrbrain-v52P_default: default NuttX firmware for VR Brain 5.2 with PWM IN
    • vrubrain-v51_default: default NuttX firmware for VR Micro Brain 5.1 with PPMSUM and SBUS
    • vrubrain-v52P_default: default NuttX firmware for VR Micro Brain 5.1 with PWM IN
    • vrubrain-v52_default: default NuttX firmware for VR Micro Brain 5.2 with PPMSUM and SBUS
  • clean: to clean “Build” directory used during building with all command
  • distclean: to clean “Build” directory used during building with all command and “NuttX” directory used during building with archives command

To build ArduCopter, ArduPlane and APMrover is necessary to create the targets into this directories:

  • ArduCopter-stable/ArduCopter: to build stable version of ArduCopter
  • ArduPlane-stable/ArduPlane: to build stable version of ArduPlane
  • APMrover2-stable/APMrover2: to build stable version of APMrover
  • ardupilot/ArduCopter: to build development version of ArduCopter
  • ardupilot/ArduPlane: to build development version of ArduPlane
  • ardupilot/APMrover2: to build development version of APMrover

You should create the following Targets into all these directories:

  • vrbrain: to build firmware for all VR boards. All the firmwares builded are copied in the folder from which you launched the target defined. To build the firmware for only a specific board, add the command:
    • vrbrain-v45: to build firmware for VR Brain 4.5 with PPMSUM and SBUS
    • vrbrain-v45P: to build firmware for VR Brain 4.5 with PWM IN
    • vrbrain-v51: to build firmware for VR Brain 5.1 with PPMSUM and SBUS
    • vrbrain-v51P: to build firmware for VR Brain 5.1 with PWM IN
    • vrbrain-v52: to build firmware for VR Brain 5.2 with PPMSUM and SBUS
    • vrbrain-v52P: to build firmware for VR Brain 5.2 with PWM IN
    • vrubrain-v51: to build firmware for VR Micro Brain 5.1 with PPMSUM and SBUS
    • vrubrain-v51P: to build firmware for VR Micro Brain 5.1 with PWM IN
    • vrubrain-v52: to build firmware for VR Micro Brain 5.2 with PPMSUM and SBUS
  • configure: this command create the config.mk file where some required paths by building are defined
  • clean: to clean all files created during building

To build Bootloader is necessary tocreate the following Targets:

  • Bootloader/libopencm3: to build libopencm3 libraries used by Bootloader source code:
    • clean: to clean all compiled files of libopencm3 libraries
    • lib: to build libopencm3 libraries
  • Bootloader: to build bootloader of all boards. All the bootloaders builded are copied in the folder Bootloader:
    • clean: to clean all compiled files of bootloader
    • all: to build all bootloaders

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s