Hi

This will be a guide to building the NanoVNA source code from a fresh Ubuntu machine.

First off, we need git.

In a terminal window run the following:

sudo apt-get install git

Following the guide available on GitHub we generate and add an ssh key:

ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"

eval "$(ssh-agent -s)"

ssh-add ~/.ssh/id_rsa

We need to copy this key to the clipboard with xclip:

sudo apt-get install xclip

xclip -sel clip < ~/.ssh/id_rsa.pub

Login to GitHub to add ssh key:

Click the green New SSH Key button

/data/1/2021/8/header.png

Give it a Title and paste the copied key in this window

/data/1/2021/8/key.png

Once that is done we can add some prerequisites:

In a terminal window run the following:

wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2

sudo tar xfj gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2 -C /usr/local

PATH=/usr/local/gcc-arm-none-eabi-8-2018-q4-major/bin:$PATH

sudo apt install -y dfu-util

Once that's dusted off we can clone the repo :

In a terminal window run the following:

git clone https://github.com/ttrftech/NanoVNA.git && cd NanoVNA

git submodule update --init --recursive

/data/1/2021/8/terminal.png

Type yes when asked

If you see something like this

Submodule path 'ChibiOS': checked out '669d4bbc8da1ee0e4ccdf93a472b06d183922320'

All is good!!!

Build the library with:

 make

/data/1/2021/8/make.png

That's a successful build right there!

Flash by setting the device to DFU boot, either in software or by short of pins :

Short the two pins in the red circle with the device powered off, then with the pins shorted power on the device.

This will enter DFU mode, with a blank white screen.

The device can now be flashed.

/data/1/2021/8/Clipboard02_637045605702995459.jpg

Software Reset to DFU

/data/1/2021/8/Untitled_637045609399378961.png

Then to flash:

make flash

/data/1/2021/8/term2.png

This is what to expect when flashing the device.

Windows Flashing:

For conversion to dfuse dfu file format for Windows flashers:

In the ubuntu terminal still:

dfu-tool convert dfuse ./build/ch.hex test.dfu

Set PID, VID:

dfu-tool set-product test.dfu df11

dfu-tool set-vendor test.dfu 0483

/data/1/2021/8/dfu_637040472034753572.PNG

Experimental build from a branch that enables Time Domain Stuff

/data/1/2021/8/f7b19879-3ad4-40b2-9bf2-ba61c4800977_637038277760524368.jpg

Added menu items

/data/1/2021/8/f7b19879-3ad4-40b2-9bf2-ba61c4800977_637038278344661689.jpg

Hopefully, this will help some folks get to building the firmware of this device.

Kind Regards

Ohan

ZS1SCI