LHRe¶
Longhorn Racing Electric's monorepo: firmware for every ECU on the car, the hardware abstraction layer it's built on, and the tooling to build, test, and flash it all with Bazel.
Layout¶
| Directory | What lives there |
|---|---|
drivers/ |
Hardware. LHAL (our platform-independent HAL) and vendor HAL packages. |
lib/ |
Platform-agnostic C++ that builds on host and target (ring buffers, CRC, CAN pack/unpack, …), with colocated tests. |
apps/ |
Host-side software: telemetry, dashboards, gateways. |
boards/ |
Per-ECU firmware projects (boards/VCU is the reference layout). |
tools/ |
Build and dev tooling: firmware_project, flashing, formatting. |
There are no per-year directories: main is always the current car, and past
seasons live in tags and maintenance branches (see
CONTRIBUTING.md).
Prerequisites¶
- Bazelisk (installs the pinned
Bazel from
.bazelversionautomatically) - Git
That's it — compilers (ARM GCC for firmware, LLVM for host code) are hermetic and downloaded by Bazel. No Xcode, MSVC, or system GCC needed for C++. STM32CubeMX is only needed when changing a board's peripheral configuration.
On Windows, builds run locally instead of on remote executors; for full remote execution use WSL2 (see the comments in .bazelrc).
First steps¶
Build the VCU firmware:
Run all tests (on the BuildBuddy Linux executors by default):
Run the VCU simulator on your machine:
Flash a board over ST-Link:
Remote build setup (BuildBuddy)¶
Builds stream to and cache on lhre.buildbuddy.io.
To authenticate, copy .bazelrc.user.example to
.bazelrc.user (gitignored) and paste your API key from BuildBuddy →
Settings → API keys — ask a software lead for an invite to the org.
No key, or no internet? --config=local builds entirely on your machine.