Skip to content

Instantly share code, notes, and snippets.

@Juul
Created June 15, 2022 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Juul/0a0b2f8015a4893c42b5d8b4ef1f6b02 to your computer and use it in GitHub Desktop.
Save Juul/0a0b2f8015a4893c42b5d8b4ef1f6b02 to your computer and use it in GitHub Desktop.
Compile firmware for NanoVNA V2 Plus clone SAA-2N

The SAA-2N is a knockoff/clone of the NanoVNA V2 Plus and you should NOT buy one.

Order an official one from https://nanorfe.com/nanovna-v2.html

However, if one for some reason falls into your hands, it might be unobvious how to find a firmware that compiles for it. I'm not sure if there are mutliple sub-versions of the SAA-2N but this one has a 4" screen.

sudo apt install gcc-arm-none-eabi  python3-serial
git clone -recursive https://github.com/nanovna-v2/NanoVNA2-firmware
cd NanoVNA2-firmware/
git checkout d9c768b298677d2fecc98fb37ec9cd4395dc781e # optional. latest version as of this writing

Now uncomment the following line in Makefile:

CPPFLAGS      += -DDISPLAY_ST7796

and then:

make -j4 BOARDNAME=board_v2_plus EXTRA_CFLAGS="-DSWEEP_POINTS_MAX=201 -DSAVEAREA_MAX=7" LDSCRIPT=./gd32f303cc_with_bootloader.ld
git checkout -- gd32f303cc_with_bootloader.ld
make -j4 BOARDNAME=board_v2_plus EXTRA_CFLAGS="-DSWEEP_POINTS_MAX=201 -DSAVEAREA_MAX=7" LDSCRIPT=./gd32f303cc_with_bootloader.ld
# yes you have to repeat that make command

Now hold the left-most button while turning on the VNA and then

python bootload_firmware.py -f ./binary.bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment