Git Product home page Git Product logo

nanovna-v2-firmware's Introduction

This repository contains the source code to build the firmware for the NanoVNA2 (or SAA2) See https://www.nanorfe.com for more info.

Below is information for building the firmware on Linux.

Installing the compiler

On any recent Debian based installation:

apt install arm-gcc-none-eabi python3-serial

Getting all source code

The code is spread out over 3 repositories:

git clone https://github.com/nanovna/libopencm3-gd32f3.git
git clone https://github.com/gabriel-tenma-white/mculib.git
git clone https://github.com/nanovna/NanoVNA-V2-firmware.git

The libopencm3 is not build automatically and must be build before building the project. This is a one time step. Build the libopencm3:

cd libopencm3-gd32f3
make
cd ..

Now edit the Makefile to point to the correct library

cd NanoVNA-V2-firmware

open the Makefile in your favorite editor and change the two lines with

MCULIB         ?= /persist/mculib
OPENCM3_DIR    ?= /persist/libopencm3

So they point to the directories that where create during the checkout:

MCULIB         ?= /home/YOUR-USER/mculib
OPENCM3_DIR    ?= /home/YOUR-USER/libopencm3-gd32f3

Building

Now you can build the firmware by running make:

make

Flashing the firmware

There are two options to update the firmware when using the regular USB interface:

  • Use NanoVNA-QT
  • Command line For this to work the device must stay in the bootloader and enter DFU mode

Another option is using a debugger using the debug pins.

Entering DFU mode

Switch the device off
Press and hold down the left button (the one closest to the Port 1 or the On/Off switch)
Switch the device on (screen stays white), release the button

The current user probably needs to be part of the dialout group to allow access.

Flashing can be done by running:

python dfu.py -f binary.bin

On some systems you may need to invoke python3 instead:

python3 dfu.py -f binary.bin

Note that depending on your installation the device might be seen as an Mobile Modem (3G/4G/etc) and it will not open the /dev/ttyACM0 port. After a while the modem manager will give up and you can access the device. If this is too much of a burden, you need to add udev rules to block modem manager from doing so.

nanovna-v2-firmware's People

Contributors

dislord avatar gabriel-tenma-white avatar nanovna avatar wutje avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.