-
Notifications
You must be signed in to change notification settings - Fork 3
Compiling the SBG Library on Linux\Unix\WSL
Jonathan Papineau edited this page Mar 11, 2021
·
3 revisions
Run ./build-and-run.sh
to build and run automatically.
./build.sh
to just build.
./run.sh
to just run.
You might need to install the necessary build tools. Here is the command for a few distros:
Debian/Ubuntu: sudo apt update && sudo apt install ninja-build cmake gcc make
OpenSUSE: sudo zypper in ninja cmake gcc make
Here's how to compile the code on your laptop:
- go to:
cd sbgECom/projects/unix
- run
cmake -G 'Unix Makefiles'
to generate makefiles for the example.c
file - run
make
to actually compile - go to:
cd sbgECom/bin
- run the it with:
./MainLoop
The actual source code is in: sbgECom/src
The firmware guide should be in <path_where_SBG_folder_is>/SBG/Documentation/Common
Things you might have to do:
- determine which serial port the SBG is on (usually when you list your serial ports you'll see a description like
FTDI device
or something involving FTDI- after you know what it is, modify the
.c
file to match that port, it should be something like:
- after you know what it is, modify the
errorCode = sbgInterfaceSerialCreate(&sbgInterface, "/dev/TTYUSB0", 921600); // Example for Unix using a FTDI Usb2Uart converter
you should change the "/dev/TTYUSB0"
to match your serial port
- Getting started
- Environment Variables
- Compiling the SBG Library on Linux\Unix\WSL
- Developing on Windows with VSCode
- Set Environment Variable In Vscode With The Cmake Plugin
- Creating Unit Tests
- Cross compiling for the Raspberry Pi
- Info and Error Logging in the Rocket Code
- Send Folder via SSH
Configuration:
Raspberry Pi Setup:
- Add a new wifi network on the Raspberry Pi
- Connect to Raspberry Pi via SSH
- Important Notes About Setting Up Raspberry Pi
- Running Emulation of Raspberry Pi
Logging Format: