Build the firmware yourself

Most people should use the web flasher instead. This page is for building the firmware from source, and for changing it. What to buy, drivers and troubleshooting are in flashing.md.

What you need on the computer

This was built on macOS (Apple silicon). Linux should follow the same steps but I have not run them there.

Build

git clone --recurse-submodules https://github.com/maveric1977/helrig-box.git
cd helrig-box
. /path/to/esp-idf-v5.5.3/export.sh
export LIBCLANG_PATH=...            # macOS: see above
scripts/build.sh                    # or: scripts/build.sh --release

scripts/build.sh builds ToneRelay (the submodule in third_party/ToneRelay) with this repository's profile/ through the TONERELAY_PROFILE_DIR variable. The first build compiles ESP-IDF and the Rust crates and takes a few minutes [bench: about 40 s for a rebuild with warm caches; the cold build was not timed]. The result is third_party/ToneRelay/esp32-p4/target/riscv32imafc-esp-espidf/debug/hxbridge-p4.

Flash

Connect the board's UART USB-C port to your computer, then:

scripts/flash.sh -p /dev/cu.usbmodemXXXX --fresh      # macOS port name; on Linux /dev/ttyACM0 or /dev/ttyUSB0

Then follow Setting up a Helrig Box.

If something does not work, see Troubleshooting.