Skip to content

Build Environment Setup

This tutorial guides you through setting up a development environment for building NanoVNA-H firmware from source.

  • Installing the ARM cross-compiler toolchain
  • Extracting and preparing ChibiOS
  • Verifying your build environment
  • Platform-specific setup (Linux, macOS, Windows)

Before starting, ensure you have:

  • Git installed
  • Basic command-line familiarity
  • About 500 MB disk space
  1. Clone the repository

    Terminal window
    git clone https://github.com/hugen79/NanoVNA-H.git
    cd NanoVNA-H
  2. Extract ChibiOS

    ChibiOS (the real-time operating system) is stored as a compressed archive, not a git submodule.

    Terminal window
    7z x ChibiOS.7z

    If you do not have 7z, install it:

    • Linux (Debian/Ubuntu): sudo apt install p7zip-full
    • Linux (Arch): sudo pacman -S p7zip
    • macOS: brew install p7zip
    • Windows: Download from 7-zip.org
  3. Verify the ChibiOS directory exists

    Terminal window
    ls ChibiOS/

    You should see directories like os/, test/, demos/, etc.

Option 1: From ARM website (recommended for version control)

  1. Download ARM toolchain version 8

    Visit the ARM Developer website and download: gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2

  2. Extract to /opt

    Terminal window
    sudo tar xjf gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2 -C /opt
  3. Add to PATH

    Add this line to your ~/.bashrc or ~/.zshrc:

    Terminal window
    export PATH="/opt/gcc-arm-none-eabi-8-2019-q3-update/bin:$PATH"
  4. Reload shell configuration

    Terminal window
    source ~/.bashrc

Option 2: From package manager (check version)

Terminal window
sudo apt install gcc-arm-none-eabi
  1. Check compiler version

    Terminal window
    arm-none-eabi-gcc --version

    Expected output (must be version 8):

    arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2019-q3-update) 8.3.1 20190703 (release)
  2. Check make is available

    Terminal window
    make --version
  3. Test compilation

    Terminal window
    cd /path/to/NanoVNA-H
    make clean
    make

    A successful build produces:

    • build/H.elf - ELF executable
    • build/H.bin - Binary for flashing

After setup, your directory should look like:

NanoVNA-H/
├── ChibiOS/ # Extracted RTOS (from .7z)
├── NANOVNA_STM32_F072/ # NanoVNA-H board files
├── NANOVNA_STM32_F303/ # NanoVNA-H4 board files (note: NANANOVA typo is intentional)
├── FatFs/ # FAT filesystem for SD card
├── fonts/ # Display fonts
├── vna_modules/ # Measurement modules
├── main.c # Main application
├── ui.c # User interface
├── plot.c # Display plotting
├── nanovna.h # Central header
├── Makefile # Build configuration
├── ChibiOS.7z # ChibiOS archive
└── build/ # Build output (created by make)

The Makefile supports two hardware targets:

TargetCommandOutputHardware
F072 (default)makebuild/H.binNanoVNA-H
F303make TARGET=F303build/H4.binNanoVNA-H4

”arm-none-eabi-gcc: command not found”

Section titled “”arm-none-eabi-gcc: command not found””
  • Verify PATH includes the toolchain bin directory
  • Restart your terminal after modifying PATH
  • On Windows, check environment variables in System Properties

”ChibiOS directory not found” or missing includes

Section titled “”ChibiOS directory not found” or missing includes”
  • Ensure you extracted ChibiOS.7z
  • The ChibiOS/ directory must be in the NanoVNA-H root
  • Verify you have version 8 of the ARM toolchain
  • Try make clean before rebuilding
  • Check that all files were extracted completely
  • The firmware is already built
  • Use make clean to force a rebuild