Skip to content
Adrian Batzill edited this page May 22, 2020 · 14 revisions

Choices...

If you want to start working on the Stratux code base, here are a few hints for a developer-friendly setup. Note that this only works as-is for the Stratux EU Edition.

You basically have two choices.

  • Remotely working on a PI
  • Working locally on a Linux machine

Working remotely on a pi can also be done from Windows and has the advantage of full hardware support (e.g. AHRS module, which can't be plugged into your PC). Working locally on a Linux machine is a bit harder to set up and requires some creativity, but is much faster and more comfortable when doing basic work that doesn't rely on AHRS/Baro stuff.

Remote Setup

To work remotely on the PI, first, connect to it via Putty/SSH and set a root password. After connecting, type sudo passwd and set your desired password. Afterwards, install Visual Studio Code on your PC, and additionally install and configure the VSCode Remote-SSH Extension: https://code.visualstudio.com/docs/remote/ssh When done, connect to the RPi as root via Visual Studio Code. Then click File->Open Folder and type in /root/stratux. You should now have the Stratux EU project loaded into VSCode. There are preconfigured build an debug tasks in the project which allow you to create a debuggable Stratux build and actually remote-debug it using GDB (sadly, the Go Delve Debugger doesn't work on ARM and lldb seems to be buggy, so only GDB works somewhat). The debugging experience is a bit buggy, but better than nothing. To get started, you need to install the "Native Debug" and "Go" extensions ("Install on Stratux" while connected via Remote-SSH) and potentially apt install gdb. Before debugging, please run stxstop and make clean in the embedded terminal first, so VSCode can create and run a debug build.

Local x86 Linux Setup

First, you need to install and setup go and its dependencies. Once done, you can try to build your first X86 version of Stratux. Clone the Stratux repository and run sudo make -f Makefile.x86. If any errors occur, try to figure them out. Then run make -f Makefile.x86 install to download and install the OpenGliderNet stack for Flarm/FANET/... reception, install the required udev rules, create the stratux.conf file, etc. Once everything is running, you might want to install Visual Studio Code and open the Stratux directory in there. There are preconfigured build and debug tasks for VSCode in the repository.