Project Camelot Toolchain Usage

This page will document the GCC based toolchain to allow  developers to build code to run on NavOS based devices.

The toolchain is being actively developed along with NavOS

Introduction

Contents



Build Environment

Requirements

Ubuntu 20.04 based Linux distribution (WSL 20.04 LTS has been tested as well as a standalone x86_64 20.04 LTS server)

WSL Only

Edit ~/.profile and add the following at the end to fix file permissions, then close and re-open the shell

if [ "$(umask)" = "0000" ]; then umask 0022 fi

Updating and adding required packages for x86_64 build

sudo apt-get -y update && sudo apt-get -y upgrade sudo apt-get -y install build-essential pkg-config u-boot-tools bison flex autoconf libtool libtool-bin texinfo sed gcc g++ sed make binutils bash patch gzip bzip2 perl tar cpio python unzip rsync file bc libncurses5-dev g++- cmake gdb

Adding Navtech ARM Hard Float Compiler

Copy the arm-navtech-linux-gnueabihf_sdk-buildroot_imx6q-tx6q-1033.tar.gz to your users home folder

mkdir ~/toolchains tar xzf arm-navtech-linux-gnueabihf_sdk-buildroot_imx6q-tx6q-1033.tar.gz -C ~/toolchains/ cd ~/toolchains/arm-navtech-linux-gnueabihf_sdk-buildroot/ ./relocate-sdk.sh

Add Navtech Compiler to the path if not using CMake

Edit ~/.profile and add the following at the end to update the path, then close and re-open the shell

Recommendations

Navtech uses the CMake (documentaion here) build tool to simplify development, CMake easily allows swapping between toolchains and has built-in support for using cross compilers. It also has support for unit testing.

Navtech uses VSCode with remoting tools to allow any host operating system that can run VSCode to build and cross compile projects that will run on NavOS devices

VSCode Extensions

VSCode CMake Basic Setup

CMake Test to prove both x86_64 and ARM Hard Float Compiler work

Create a file called CMakeLists.txt

Create a file navtech-test.cpp with the following contents

Run CMake to create two build folders one for each compiler


Related Information