Head Tracker v2.1
  • Head Tracker v2.1
    • HeadTracker v2.2
  • Getting Started
    • Hardware Required
    • Software Installation
      • Flashing Firmware
    • Wiring
      • Option 1- Bluetooth
        • Adding a FrSky BT Module
        • Checking Bluetooth Functionality?
      • Option 2 - Wired
        • Pulse Position Modulation (PPM)
          • Trainer Ports
        • Serial Bus (SBUS)
          • Radio Master TX16S Setup
          • FrSky Taranis X9D
      • Option 3 - Bridged
        • Radio Master TX16S Mk2
      • Analog Input
      • Digital Inputs
      • PPM Input
      • PWM Output
      • ELRS Setup
      • Flight Stick
    • Mounting
      • User Designed Cases
    • Structure of the Application
    • IMU, Calibration and Drift
    • Extended Servo Range
  • Settings
    • GUI Setup
      • Tilt / Roll / Pan
      • General
      • Output
      • Input
      • Bluetooth
      • PWM
      • Analog
      • Aux
  • Radio Setup
    • How to Edit Documentation
    • Open/Edge TX
      • Color Screen Radios
      • Black and White Radios
    • Jeti
    • Spektrum
      • NX
      • DX
        • DX18
    • Flysky
    • Frsky - Ethos
  • Videos
    • YouTube
  • Support
    • Discord Chat
    • Issues
    • Development
      • Firmware
        • Debugging
        • Arduino Nano 33 BLE
        • IMU Sensor Chip
      • GUI (Qt6)
      • GUI (Qt5, Depreciated)
      • Git Workflow and Actions
  • Links
    • Download
    • GitHub Page
    • RC Groups Forum
Powered by GitBook
On this page
  • Install Visual Studio Code
  • Add PlatformIO Extension
  • Clone the Git Repository or download + extract the .zip file from GitHub
  • Choose File->Open Workspace from File
  • Choose the Build Task in VSCode
  • A few things about Zephyr
  • How to add your changes and make a Pull Request
  • Happy coding. Visit Discord for Support

Was this helpful?

  1. Support
  2. Development

Firmware

How to compile the firmware for yourself

PreviousDevelopmentNextDebugging

Last updated 2 years ago

Was this helpful?

Install Visual Studio Code

Defaults install options are fine

Note this Guide is for Windows. Linux and Mac should be similar

Add PlatformIO Extension

Choose install. Wait for all the installation popup messages at the bottom to complete. It can take a while to install, don't close or do anything else in the meantime.

The final message is please restart VSCode. Go ahead and Restart VSCode by clicking the Reload Now button.

After it reboots you should see the PlatformIO icon on the bottom of the left tool bar (Alien Head)

Clone the Git Repository or download + extract the .zip file from GitHub

I would suggest using an app like GitHub desktop to clone and keep up to date with changes if your not a command line GIT expert. Use https://www.gihub.com/dlktdr/Headtracker for the URL Clone source.

There are a lot of sub folders in the GitHub Tree and can overwhelm Windows max path length. Keep it close to the root or it may not compile. e.g. C:\HeadTracker

If your trying this on Linux, it should be fine anywhere, supports a much longer path length 4096 vs 255 on Windows.

The folder cannot contain any spaces.

Choose File->Open Workspace from File

The workspace file to open is firmware/src/headtracker.code-workspace

Choose the Build Task in VSCode

Under the PlatformIO extension tab, expand HeadTracker-Zephyr-Nano33_BLE and click build

It will install all the necessary packages, and try to compile. This takes a while!

With any luck you should get...

SUCCESS

A few things about Zephyr

  • The device tree file .dts is located in the folder

    %USERPROFILES%\.platformio\packages\framework-zephyr\boards\arm\ * I have left this file as shipped and have used an device tree overlay file in zephyr/arduino_nano_33_ble.overlay which defines the hardware used Changed in master on 7/25/21

  • The prj.conf file located in src/zephyr contains all the KConfig options included in the code

How to add your changes and make a Pull Request

If you want to add your changes to the main project, follow these steps. You should always work in a branch not in Master. There are many tutorials online. Git is a very powerful tool and can be overwhelming, start with a GUI and learn the command line after.

  1. Be sure your Master branch is up to date.

  2. Create a new local branch

  3. Make your changes

  4. Publish your new branch to your github account

  5. Create a pull request on GitHub.com

Happy coding. Visit Discord for Support

How to Video
https://code.visualstudio.com/downloadcode.visualstudio.com
GitHub - dlktdr/HeadTracker: This project is built to record the orientation a FPV headset to allow the camera on your RC to follow your head movements.GitHub
Logo