Skip to content

Firmware setup

This guide assumes that you have already read Initial Setup.

  1. Run the following command in a directory of your choice to clone the repository:

    Terminal window
    # if you are using HTTPS
    git clone https://github.com/UWOrbital/obc-firmware.git
    # or if you are using SSH
    git clone git@github.com:UWOrbital/obc-firmware.git
  2. Install our required tools:

    Terminal window
    sudo apt update
    sudo apt install -y build-essential gcc-multilib g++-multilib cmake curl

    Install uv, our Python package manager:

    Terminal window
    curl -LsSf https://astral.sh/uv/install.sh | sh
  3. Install Python 3.12+. If you are using Ubuntu 24.04 LTS or later, or installed the default WSL distribution, you should already have a compatible version of Python installed.

    Terminal window
    sudo apt install python3

    Check your installed Python version with:

    Terminal window
    python3 --version

    If it’s 3.12 or higher, you’re good.

  4. Install dependencies by running the following command in the repository’s root directory:

    Terminal window
    uv sync
  5. Setup pre-commit by running the following command in the repository’s root directory:

    Terminal window
    pre-commit install
  6. Use the following to initialize the submodule representing our interfaces repository.

    Terminal window
    git submodule update --init

    We use git submodules to use our interfaces repository from this repository. Many builds and includes will not work if the interfaces/ directory is empty (most tasks will not require you to change code related to interfaces/, however it still needs to be set up once). Should you wish to learn about git submodules, https://git-scm.com/book/en/v2/Git-Tools-Submodules is a good resource.