Firmware using GitPod.io

As of Apr 7, 2024 this is the easiest way to compile the firmware.

Using Zephyr's west tool to compile the code is quite a bit more powerful and makes using this code with different hardware easier. The downside of this is it's not as easy to get your build chain setup. I suggest using GitPod to get started. It allows quick code changes and easy building of firmware without having to install anything on your computer. If you want to hook up a debugger you will need to setup the toolchain on your computer. How to setup on your local PC

If you already have a github account you can use it to login. This will automatically take you into the master branch of the github code.

2) Create the new Workspace

3) Wait for the container to be downloaded or built.

The time required to build the container depends on the last connection made by an individual. This process might entail some waiting or necessitate rebuilding. GitPod retains binary files for a limited duration. You may encounter one of the following scenarios: if a rebuild is necessary, the initial opening might be slower.

4) Once open you will see a Visual Studio Code like environment.

Everything you need to build the project has been setup in this container. You will use the terminal to build for the various boards. To start with you need to enter the proper firmware folder.

cd firmware/src

Once in this folder you can compile code the code for any of the below boards.

Build Commands

Command
Board

west build -p -b arduino_nano_33_ble

west build -p -b arduino_nano_33_ble -- -DBOARD_REV2=y

west build -p -b xiao_ble/nrf52840/sense

west build -p -b xiao_esp32c3

west build -p -b m5stickc_plus/esp32/procpu

west build -p -b dtqsys_ht

DTQSYS HeadTracker

west build -p -b esp32c3_devkitm

The -p argument in all the build commands means do a pristine build. Which means clear everything and start from scratch. If your switching between different boards you will need this to clean up the build system. If your only working on a single board you can remove this argument and it will speed up the build to only compile the required changes.

Once the build is complete you can find the bin file that you can upload to your board under firmware/src/build/zephyr

5) Flashing

Download the .bin file or .uf2 file Arduino Nano boards - You can use the HeadTracker GUI and select from local file to upload it. If you have problems double tap the reset button when it shows waiting for programming port. XIAO or (Raspberry Pi Pico/RP2040 boards - Copy the .uf2 to the drive that comes up when it's in bootloader mode. Double tap reset to bring up the drive ESP32 variants - ESPHome-Flasher is the easiest one I have found https://github.com/esphome/esphome-flasher/releases

Last updated