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.

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

Build Commands

CommandBoard

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

To see the most updated versions of the above commands check files build_all.sh (Linux, GitPod) or build_all.cmd (Windows). You can execute this file and all options will be built and placed in firmware/src/build_bins

Not all the boards are actually functional, currently these are the only ones that are fully functional.

Nano33BLE (Includes Sense variant) Nano33BLE Rev 2 (Includes Sense variant) XAIO NRF52840 XAIO NRF52840 Sense

M5STICKC_PLUS is close to working. No PPM in/out or display yet.

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