Close

Building under MINGW in Windows

A project log for HP545xx Data Acquisition Software

A software tool to use an HP545xx Digital Scope for Data Acquisition

bharbourBharbour 10/12/2022 at 02:380 Comments

After digging through my old code archives (tombs?) I found the recipe for building this tool under Windows using the MINGW/msys 32 bit tool chain.

Be sure that you downloaded the HP54542_ctl_Multi_Build_10_12_2022.zip file if you want the changes that allow the program to build in the MINGW environment. The contents of this file will build in either a Linux environment (after installing the open source LinuxGPIB driver package) or the 32 bit MINGW environment under Windows. There are also some changes to make it easier to build for the HP54522 or HP54520 scopes. See the aa_notes file to build for the HP5452x family of scopes.

There is a Microsoft file: chkstk.obj that needs to get added to the link phase in the Makefile. The ni4882.obj file also needs to get added to the link phase.

The chkstk.obj, ni4882.obj and the ni4882.h files all need to be added into the compile directory. The ni4882.obj and ni4882.h files come from the National Instruments 488.2 driver package that you must install before doing any of this stuff. The chkstk.obj file comes from Visual Studio (I think).

The ni4882.obj and ni4882.h files are copyright National Instruments and chkstk.obj is copyright Microsoft. These 3 files are not included in the zip file because of their copyright status.

The NI library does not have the function   gpib_error_string () in it. The MINGW/Windows build includes a function that returns the error identification string for the iberr values.

If you want to build this tool as a 64 bit program, you could probably do it using the free Visual Studio tool set from Microsoft. Be sure to add the -DMINGW_ENV parameter to your compile flags because that triggers some required changes to build in any Microsoft environment. Also, be sure to get the 64 bit version of the ni488-2 driver package. You are on your own for the rest of this.

The file aa_notes has some useful stuff on compiling this program.  The AA_Readme file has stuff on using the program.

I still don't have a 5452x family scope to test the 2 channel changes on, so those changes are still untested. The 5454x version has been used for several months with no problems seen.

Discussions