¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Building the firmware


 

Hi all,

I've been trying to build the FW for this as I would like to make some changes but it fails to build. I've found that it needs ChibiStudio but I can't get that to build or run. There is a preview version but it seems that this only runs on 32-bit windows.

Trying to build the FW, produces many errors most related to missing include files, both standard inlcude files and local include files (e.g. ch.h and hal.h, these don't exist in any of the source downloads I've tried although there are local includes for chconf.h and halconf.h, just not sure if this is what I should use).

After a bit of research looking at the make files, I discovered the need for ChibiStudio. Looking through the source for this, it contains the missing standard include files but as I said, this won't run on a 64 bit Windows OS (Win7 in my case).

Would be grateful for any info as to how I can build the FW.

Thanks

George M0MGN


 
Edited

You'll probably be better able to build in a Linux VM running on Win7.
Have you tried contacting the two forum members who supposedly had successful builds?
Their posts are around the end of July-beginning of Aug.
There is also another member trying to build - his posts are from last week.

Also - do a search on Github for NanoVNA-F and you will find that someone used FreeRTOS instead of Chibios

You might want to go that route.

Good luck!


Lapo Pieri
 

Hi,
12:39 Thu 29 Aug 19 , grn@... wrote:
Would be grateful for any info as to how I can build the FW.
I've no experience in Windows, I use free sw since 1994 and I can't give
you any advice.
I can just say that building tree works fine for me but Chibios submodule
don't update so I've to get it by a git clone directly in his dir.
Don't forget to move to right checkout: follow instructions in README

73, Lapo IK5NAX


DMR
 
Edited

INSTALL: ChibiStudio, java, MINGW, Cygwin in disc C.

Prescribe:
Prescribe "PATH" in ChibiStudio (Eclipse) (C:\gcc\bin)
prescribe "toolchain" in ChibiStudio (Eclipse). (Cygwin)

In Windows, the control panel, the system, in addition, environment variables (bottom and top).

Prescribe "PATH" C:\Documents and Settings\All Users\Application Data\Oracle\Java\javapath;C:\gcc\bin
Prescribe "PATH" C:\gcc\bin

Better to apply PATH, by downloading Lpcxpresso $ PATH=$PATH:/Applications/lpcxpresso_7.8.0_426/lpcxpresso/tools/bin

To the project file, copy all the contents from the folder ChibiOS.
Download from here

When importing a project, select Cygwin compiler.

In the file (rules.mk) below, delete the following lines

ChibiOS\os\common\startup\ARMCMx\compilers\GCC\rules.mk

$(BUILDDIR)/$(PROJECT).bin \
$(BUILDDIR)/$(PROJECT).dmp \
$(BUILDDIR)/$(PROJECT).list
$(BUILDDIR)/$(PROJECT).list ifdef SREC OUTFILES += $(BUILDDIR)/$(PROJECT).srec endif # Source files groups and paths ifeq ($(USE_THUMB),yes)


 

DMR, Thanks for the cygwin notes!


 

Hi DMR,

Thanks for the info but I can't run ChibioStudio. Judging from the PATH settings you define, this is for a Windows XP system running on a 32 bit processor. I am running Windows 7 on a 64 bit processor; when I run ChibioStudio (ChibioStudio GCC 7.0) it fails with a Java error 13 which is saying that it needs to run on a 32 bit processor. I've tried running it in XP compatibility mode but with the same result. Also trying to install XP in a VM but without success so far.

I already have all of the S/W other than Mingw but I don't see any need for that unless I'm missing something. Also, the lat os the 4 lines you say to delete from rules.mk does not exist in the file but I have removed all of the other three. I have one more thing to try to get an XP virtual machine running but then I am stuck.

Thanks again,

George


DMR
 
Edited

grn@... ,
Email me, I will send you everything you need for Windows 64
In the mail, remove the space after the dog.
bryonikater@ gmail.com


 

DMR,
For the benefit of the rest of the forum members that may want to try and build the firmware under Windows, would you be able to create a nanoVNA Wiki entry detailing the steps and prerequisites?
If you're not into that, send me the info and I'll create the wiki entry.

Thanks,
Larry


DMR
 

Larry Rothman,
I'll try to write detailed instruction in the coming days, for compiling source code on Windows 10§ç64 bit, Windows XPx32 bit.
I managed to successfully compile both there and there.


 

Great!
Thank you.

Of note:
If you go over to edy555's ttrftech repo, he has entered a few 'bug' reports in the last few days. One that caught my eye was a comment about not having enough space left in flash to implement a TDR function on the nano itself. For the AA version there is little room left but hugen's CH version only occupies about 95k out of 130k.
I wonder if that's enough room for that function....


Dr. David Kirkby from Kirkby Microwave Ltd
 

On Sun, 1 Sep 2019 at 02:18, Larry Rothman <ac293@...> wrote:

Great!
Thank you.

Of note:
If you go over to edy555's ttrftech repo, he has entered a few 'bug'
reports in the last few days. One that caught my eye was a comment about
not having enough space left in flash to implement a TDR function on the
nano itself. For the AA version there is little room left but hugen's CH
version only occupies about 95k out of 130k.
I wonder if that's enough room for that function....
If space is short, I would think better support for calibration kits is
more important than TDR. The idealised opens and shorts assumed by the
instrument are fine for female SMA connectors, but problems are going to
exist for both N and male SMA test ports. One really needs to be able to
enter:

1) Offset delay of opens and shorts,
2) C0, C1, C2 and C3 of the open standards.
where C(f) = C0 10^-15 + C1 10^-27 f + C2 10^-36 f^2 + C3 10^-45 f^3
where f is in Hz, C in farads.

Certainly, two or three user-defined calibration kits would be desirable,
but the most common ones should be stored I feel be in the firmware. Two of
the cal kits defined in the HP 8753 series are readily available on the
used market.

* Agilent 85032B for N
* Agilent 85033D/E for SMA/3.5 mm.

Personally, they are not the kits I use, (I use 85050B, 85052B and 85054B)
but none of those kits are going to be as useful to most people.

*TDR would be useful in firmware, but there are plenty of more important
things. *

When I get a chance to play with mine more, I will list what I think are
the most important omissions, but calibration kits is the most obvious to
me.

Dave


--
Dr David Kirkby Ph.D C.Eng MIET
Kirkby Microwave Ltd
Registered office: Stokes Hall Lodge, Burnham Rd, Althorne, CHELMSFORD,
Essex, CM3 6DT, United Kingdom.
Registered in England and Wales as company number 08914892

Tel 01621-680100 / +44 1621-680100


 

Excellent!
Thanks


DMR
 

Compilation of NanoVNA source code in Windows XPx32, Windows 10x64
Installation verified, sorry for possibly inaccurate translation.


 

The main limitation to putting the TDR function on the device is RAM. You can write the FFT to pad the end of the frequency domain array with zeros without using up memory, but you still need space for the time domain output.

That said, I've not yet examined the mathematics of time gating and I've not looked at the current FW source yet.

Conditional compilation might let the user select which functions they wanted so for example they might be able to have SWR, log magnitude and TDR for doing antenna work. That would allow tuning antennas, measuring cable losses and finding cable faults with a $35-50 device. And one could always reflash a different set of options.

However, I'm hoping that with expanded functionality using a larger MCU, the OEMs will adopt that instead.

With the basic functionality and design worked out, there is a lot of opportunity to use bigger screens, add USB or SD card support, better packaging, longer battery life, etc.

It would be interesting to know how many companies are building these, but OSSW/OSHW provides an opportunity for an individual with a small amount of capital to enter a market previously restricted to much larger and more heavily capitalized companies. As a consequence, basic T&M kit has dropped tremendously. A personal lab bench that was unthinkable for a grad student 30 years ago is readily affordable. I was one of those poor grad students who could do almost nothing. I was not an EE, so I could not use the department labs.

Have Fun!
Reg


 

Enhancement request: please put a revision or version number on your document so when we download it, we will know more about it.
Thanks


 

Reg,
Speaking if price drops of T&M gear, I still have my Telequipment D67 scope I bought new in '73. It was $1k Cdn back then for a 25MHz device. Look what you can get for that from the likes of Rigol and others now.
...and of course, this wonderful little NanoVNA for $50.

Cheers
Larry


 

Thanks for the clear instructons.
The build is starting and then I get the error
rules_data.ld:270 cannot move location counter backwards (from 20004120 to 20004000)
Is this a message about memory shortage?
I'm trying to build the latest NanoVNA-H from hugen on Github.
Any suggestions what I may be doing wrong?


 

With the linker map attached


 

Hello David,
following a request to add better calibration to my app for the NanoVNA, I
have implemented it in the software, but using "ideal" calibration
standards as the reference, as I have nothing better to go on.

I understand from your post that relevant data would be C0-3 of opens, and
offset delays on opens and shorts. Would there be any correction data for a
load? Could you perhaps give an example of values, so I can use appropriate
units for the input fields?

I hope you can find the time to help.

Thanks,
--
Rune / 5Q5R

On Mon, 2 Sep 2019 at 14:09, Dr. David Kirkby from Kirkby Microwave Ltd <
drkirkby@...> wrote:

On Sun, 1 Sep 2019 at 02:18, Larry Rothman <ac293@...> wrote:

Great!
Thank you.

Of note:
If you go over to edy555's ttrftech repo, he has entered a few 'bug'
reports in the last few days. One that caught my eye was a comment about
not having enough space left in flash to implement a TDR function on the
nano itself. For the AA version there is little room left but hugen's CH
version only occupies about 95k out of 130k.
I wonder if that's enough room for that function....
If space is short, I would think better support for calibration kits is
more important than TDR. The idealised opens and shorts assumed by the
instrument are fine for female SMA connectors, but problems are going to
exist for both N and male SMA test ports. One really needs to be able to
enter:

1) Offset delay of opens and shorts,
2) C0, C1, C2 and C3 of the open standards.
where C(f) = C0 10^-15 + C1 10^-27 f + C2 10^-36 f^2 + C3 10^-45 f^3
where f is in Hz, C in farads.

Certainly, two or three user-defined calibration kits would be desirable,
but the most common ones should be stored I feel be in the firmware. Two of
the cal kits defined in the HP 8753 series are readily available on the
used market.

* Agilent 85032B for N
* Agilent 85033D/E for SMA/3.5 mm.

Personally, they are not the kits I use, (I use 85050B, 85052B and 85054B)
but none of those kits are going to be as useful to most people.

*TDR would be useful in firmware, but there are plenty of more important
things. *

When I get a chance to play with mine more, I will list what I think are
the most important omissions, but calibration kits is the most obvious to
me.

Dave


--
Dr David Kirkby Ph.D C.Eng MIET
Kirkby Microwave Ltd
Registered office: Stokes Hall Lodge, Burnham Rd, Althorne, CHELMSFORD,
Essex, CM3 6DT, United Kingdom.
Registered in England and Wales as company number 08914892

Tel 01621-680100 / +44 1621-680100




DMR
 

Replace Makefile.