-
-
Notifications
You must be signed in to change notification settings - Fork 64
Developing Stratux
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.
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.
Before debugging, please run stxstop
and make clean
in the embedded terminal first, so VSCode can create and run a debug build.
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.