GithubHelp home page GithubHelp logo

dg9bfc / nanovna-v2-firmware Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nanovna-v2/nanovna2-firmware

0.0 1.0 0.0 740 KB

Firmware for NanoVNA V2

Home Page: https://nanorfe.com/nanovna-v2.html

License: GNU General Public License v3.0

Makefile 0.44% C++ 44.21% C 14.99% Python 3.46% Jupyter Notebook 36.83% Shell 0.07%

nanovna-v2-firmware's Introduction

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

Below is information for building the firmware on Linux.

Installing the compiler

Debian based systems

On any recent Debian based installation:

sudo apt install gcc-arm-none-eabi

Installing the upstream toolchain

If you want to install the latest version of the gnu ARM toolchain:

  1. get the latest version from https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads . You can download it using your browser or a command line tool like wget:
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
  1. untar it, eg. in /opt/toolchains:
sudo mkdir -p /opt/toolchains
sudo tar xvf -C /opt/toolchains gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
  1. set your PATH environment variable:
export PATH=/opt/toolchains/gcc-arm-none-eabi-9-2020-q2-update/bin:$PATH

Installing dependencies

To upload the firmware on the NanoVNA2, you will need:

On a Debian based system, you can use:

sudo apt install python3-serial

Getting the source code

The code is spread out over 3 repositories, 2 of which are submodules of the main NanoVNA-V2-firmware one:

git clone --recursive https://github.com/nanovna/NanoVNA-V2-firmware.git
cd NanoVNA-V2-firmware

Building

Now you can build the firmware by running make in the firmware sources directory:

cd NanoVNA-V2-firmware
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.

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.