firmware
IEM Firmware Documentation
Loading...
Searching...
No Matches
IEM Firmware

All pre-migration Git history has been preserved (frozen 7/26/25). Branch names are prefixed with (|archive/<project name>/) so they appear at the bottom of a sorted list - e.g. the develop branch from the original Safety Board repo is now |archive/safety/develop.

Doxygen

http://127.0.0.1:8000

# Build HTML docs (in `bazel-bin/`)
bazel clean --expunge && bazel build --config=safety //:docs
# Build HTML docs, host a local HTTP server, and open the documentation in the default browser.
# Docs are available at http://127.0.0.1:8000, ctrl+c with the terminal focused to exit
bazel run --config=safety //:launch_docs

Setup

Environment

VSCode Dev Container (Windows/Linux/OSX)

The quickest way to get set up is to use the pre-configured project Dev Container. This is an Ubuntu 24.04 LTS image with all the relevant tools, software, and IDE extensions installed and configured already.

  1. Follow the installation instructions for your operating system on this VSCode Dev Containers docs page. Outside of VSCode itself, you'll need to install Docker/Docker Desktop and the VSCode Dev Containers extension.
  2. Restart VSCode. You should see a pop-up in the bottom right corner of your window prompting you to reopen the folder in a dev container. If this doesn't come up, open the VSCode command palette with ctrl+shift+p and select "Dev Containers: Reopen in Container."
    • It might take a few minutes to build/attach to the container during initial setup (click the "show log" dialog in the bottom right to see what's happening)
    • If prompted, reload the window
  3. Open a terminal in VSCode - you'll see a bash prompt running in the Dev container. Build the code - see the build section below.

WSL (Windows)

Recommended for a more configurable native-linux-like development experience, but takes a bit more setup/maintenance than the Docker image. You'll need a Windows 10/11 PC with virtualization enabled (see step 0).

  1. Skip to step 1 if you already have virtualization enabled on your PC. If you don't know, open Task Manager (ctrl+shift+esc), then navigate to Performance > CPU and look for Virtualization: [Enabled/Disabled] in the bottom right.
    • If you don't have virtualization enabled, follow this guide
  2. Open an administrator Powershell prompt, then run wsl --install -d Ubuntu-24.04.
    • You may need to reboot here if this is your first WSL distro.
    • Set a username and password when prompted, then you should see an Ubuntu bash prompt.
    • Going forward, open the terminal through the Ubuntu-24.04 profile added to Windows Terminal by default
      • (drop-down menu next to the new tab button -> Ubuntu-24.04)
  3. Follow the instructions in the Git/Gitlab guide to set up Git in your WSL install ("Git Setup"/"Personal Access Token Setup" sections)
  4. Clone this repo and cd into the base directory (same as this README), then run utils/env_setup/wsl_setup.sh.
    • All this does is install Bazel and a couple of other packages (mostly Python-related).
  5. code . to open the project in VSCode (VSCode integrated terminal will be bash in WSL as well)
    • When prompted, install the recommended workspace extensions
  6. Build the code! See the build section.

Native (Linux only for now)

Install:

  • VSCode
  • bazel-8.3.1 or bazelisk (recommended)
  • clangd (or install through VSCode prompt)
  • buildifier (linting/LSP for Bazel - optional but recommended)

Clone the repo (see Git/Gitlab guide), then build the code.

Build

  1. Run bazel build --config=safety //ecu/safety in the repo root directory to build safety board code
    • This will also pull in all build dependencies (compiler toolchain, external libraries, etc.), which might take a few minutes the first time you do it.
  2. Run bazel run //:refresh_cdb
    • You'll need to do this to get language server/IDE features (autocomplete, error checking, ctrl+click, etc.) to recognize changes to the file structure in a C project - things like new/renamed files, new compiler options, different include paths, etc.
    • If you already have the repo open in VSCode, open the command palette with ctrl+shift+p, then run "clangd: Restart language server" to restart clangd.