Development virtual machine

VArcht edited this page Nov 17, 2015 · 4 revisions
Clone this wiki locally

TauLabs has created a virtual machine with everything required to start developing the TauLabs code base.

Virtual Machine link

note: The vm image is out of date, probably best to start clean!

HowTo Video


This is the new TL virtual machine for code development. The Virtual Machine is in VirtualBox format but it can be exported to other formats if requested.

It is based on Lubuntu and has a single user named taulabs and with sudo pass taulabs It already has all the necessary tools to build and debug the gcs code, firmware and android gcs Also the main git repo is already set and pulled, the current branch is next.

The code is located under /home/Code/taulabs

In terms of graphic tools installed you have eclipse for developing both the gcs and flight firmware, qt creator for the gcs and git cola for managing your git repos

Also this vm has the following CLI tools installed under the tools directory: android sdk gcc-arm toolchain openocd qtsdk

Setting Git:

The repo and mylyn github connector on eclipse are using anonymous logins, so they will be readonly. If you want to give back to the project you need to setup a github account fork the main repo and add your fork as a new remote to the local repo. You will also need to provide your credentials to this VMs git: Option 1-Using https check Option 2-Using ssh check

Usage: 1st thing is pulling the latest code, you can do this on the shell by going to Code/Taulabs and issuing "git pull" or you can use git cola or even eclipse how I'll show later. QtCreator The gcs project is already setup properly so you can just start it choose the gcs project and press the run button.

The eclipse workspace has two projects already configured, Taulabs Flight and Taulabs Ground. It also has 3 perspectives, C/C++, Debug, and Git Repository Exploring where you can browse branches, push, pull etc, and see and comment on PRs and Issues. If you expand the TauLabs Flight project you will see that only a subset of PiOS and targets are visible, this is because the workspace was set in a way that the visible code is filtered according to the current build configuration. If you click on "TauLabs Flight" and then go to Project->Build Configurations->Set Active you will see all current flight targets.

You can build flight by right clicking "TauLabs Flight" and then build project or by going in the Project menu and clicking build project.

If you want to flash the firmware using JTAG or SWD you just need to click the down arrow next to the external tools icon (Green play button with brown toolbox on the bottom) and click program.

Debugging is a two step process, first you need to start the openocd daemon by clicking the down arrow next to the external tools icon (Green play button with brown toolbox on the bottom) and clicking OpenOCD Daemon, then you need to connect to the daemon by clicking the down arrow next to the bug icon and clicking "Flight". At this time the Debug perspective will open and you will see all the normal debug controls plus the embsysregview plugin to the bottom which allows you to browse the processor registers values. This plugin doesn't pick the processor type automagically so if you debug something other that STMF3XX (VMs default) you will need to click the plugins top left icon and choose the proper processor. When you want to stop debugging right click and choose "Terminate and Remove" on both openocd and gdb sessions.

Building the GCS is the same as building flight you just need to click "TauLabs Ground" first. You can start the gcs by clicking the run icon (green play button) To debug the gcs just make sure you have built it in debug mode ( Project->Build Configurations->Set Active) and the click the down arrow next to the bug icon and click ground.

The 3rd available perspective allows you to browse the git repo (left pane) and look at TauLabs PRs and issue (right panel) using mylyn's github connector. This plugin is using anonymous access so it will not allow you to comment back and it will be limited in terms of how much information it will be allowed to access. To use you account settings click the Task Repositories tab on the panel to the right and then double click both TauLabs repositories unselect anonymous and fill out your details.