mvIMPACT Acquire SDK C++
Installation From Private Setup Routines

Table of Contents

This chapter will explain what has to be done to build installation packages for the applications target platform that include all files needed to operate the device without the need to ship the full MATRIX VISION GmbH driver setup.

Note
This approach is NOT recommended as this might cause version conflicts on the target platform e.g. when the official driver from MATRIX VISION is installed on a target platform together with a version embedded in the private setup routine. Also each time a new driver release is available this might force you to update your installation routine as well.

The latest official drivers can always be found under http://www.matrix-vision.com

Windows

Most of the driver packages are distributed as MSI (Microsoft Windows Installer™) packages. Some however will be distributed as EXE files. These packages contain so called bootstrappers - a special package format to distribute multiple files as a single installation. The internal underlying technology is also MSI.

Note
Since mvIMPACT Acquire 2.18.0 all MATRIX VISION Windows installation packages contain kernel mode drivers signed for different target platforms. During installation the merge modules will decide which driver is the one most suitable for the target system. Currently each merge module containing kernel modules will contain 3 different flavors of this module:
To migrate installers please have a look at chapter Migrating Installers

MSI Based Private Setup Routines

If your installation also uses the MSI technology this is the easiest way to distribute all the related driver files! All merge modules (*.msm-files) that belong to a certain version of mvIMPACT Acquire can be downloaded from the MATRIX VISION website (http://www.matrix-vision.com) as a compressed archive.

After extraction these merge modules then can be included into your setup project as needed and you are done.

32-bit merge modules contain 32-bit code only while 64-bit merge modules contain everything that will allow running both 32-bit and 64-bit applications. The names of the merge modules belonging to mvIMPACT Acquire will use the following extensions:

  • *.msm (Will only contain 32-bit kernel code and/or 32-bit user-mode code. This file extension is also used for files that are not bound to a certain bitness like e.g. .NET related files)
  • *.x64.msm (Will contain 64-bit kernel code and/or 32- AND 64-bit user mode code)

So to run 32-bit applications on a 32-bit version of Windows ONLY the 32-bit *.msm files shall be used and to run either 32- or 64-bit applications (or both 32- AND 64-bit applications) ONLY the 64-bit *.x64.msm files shall be used. The only exceptions from this rule are third party merge modules (e.g. the OpenMP-runtime) where this is stated differently in the list of merge modules below. As an example what is inside a merge module let us consider the mvIMPACT_AcquireBaseLibs file:

  • mvIMPACT_AcquireBaseLibs.msm contains the 32-bit version of mvDeviceManager.dll and mvPropHandling.dll
  • mvIMPACT_AcquireBaseLibs.x64.msm contains the 32-bit AND the 64-bit version of mvDeviceManager.dll and mvPropHandling.dll. Both versions of the 2 libraries will be installed into the appropriate target directories

Unattended Setups

Sometimes user interaction during an installation is not desired. The MSI engine therefore supports a set of command line options that can be used to run setups in special ways. Probably the most common way to run an unattended setup will be an installation without any GUI display or user interaction. This can be achieved like this:

// for *.msi files
msiexec /i myInstaller.msi /quiet
// for *.exe files
myInstaller.exe /install /quiet /norestart

or (with an automatic reboot of the system at the end of the installation):

// for *.msi files
msiexec /i myInstaller.msi /quiet /forcerestart
// for *.exe files
myInstaller.exe /install /quiet

For a complete list of option type

// for *.msi files
msiexec.exe
// for *.exe files
myInstaller.exe /?

in a command shell an hit the ENTER key.

Note
Since mvIMPACT Acquire 2.22.0 all MATRIX VISION installation packages will require the user to accept the EULA (End User License Agreement) before a package can be installed. For installations using the command line the ACCEPT_EULA property needs to be set if the user wants to suppress the GUI EULA confirmation:
// for *.msi packages
msiexec /i myInstaller.msi ACCEPT_EULA=yes
// for *.exe packages
myInstaller.exe /install ACCEPT_EULA=yes
Note
By using unattended setups (/quiet parameter in the command line) the user explicitly accepts the EULA!

Common Merge Modules For All Device Drivers

This following section contains merge modules will be needed by any custom installer that shall support mvIMPACT Acquire compliant devices:

Note
More merge modules than mentioned in this entire documentation are available! However these are typically not needed on a target system thus will not be discussed here. An example would be the merge module containing the API manuals. So if you are missing something here you would like to integrate in your installation have a look at the extracted merge modules. You might find it there. If not get in touch with us as we might be able to help!
Open MP runtime
Name of the 32 bit merge modules Microsoft_VC120_OpenMP_x86.msm
Name of the 64 bit merge modules Microsoft_VC120_OpenMP_x64.msm
Requirement Must be installed. To run 32 bit applications on 64 bit systems, the 32 bit merge modules must be installed as well
mvIMPACT Acquire driver framework
Name of the 32 bit merge module mvIMPACT_AcquireBaseLibs.msm
Name of the 64 bit merge module mvIMPACT_AcquireBaseLibs.x64.msm
Requirement Must be installed. In order to work with GenICam compliant devices some environment variables must be set (see Environment Variables below).
mvIMPACT Acquire .NET Framework runtime
Name of the merge module mvIMPACT_Acquire.NET.msm
Requirement Only needed if the target application has been written using the .NET Framework API of mvIMPACT Acquire. Refer to Building, Linking And Running Applications Using mvIMPACT Acquire about the differences between the .NET Framework and the .NET Standard API.
mvIMPACT Acquire .NET Standard runtime
Name of the merge module mvIMPACT_Acquire.NET.Standard.msm
Requirement Only needed if the target application has been written using the .NET Standard API of mvIMPACT Acquire. Refer to Building, Linking And Running Applications Using mvIMPACT Acquire about the differences between the .NET Framework and the .NET Standard API.
mvIMPACT Acquire Java runtime
Name of the 32 bit merge module mvIMPACT_AcquireJava.msm
Name of the 64 bit merge module mvIMPACT_AcquireJava.x64.msm
Requirement Only needed if the target application has been written using the Java API of mvIMPACT Acquire.
mvIMPACT Acquire tools prerequisites
Name of the 32 bit merge module mvIMPACT_AcquireExecutablesPrerequisites.msm
Name of the 64 bit merge module mvIMPACT_AcquireExecutablesPrerequisites.x64.msm
Requirement Only needed if mvIMPACT_AcquireTools is installed. Contains additional libraries that are needed by some of the tools. In particular this merge module contains the mvDisplay.dll which might be needed by a customers applications as well.
mvIMPACT Acquire tools
Name of the 32 bit merge module mvIMPACT_AcquireTools.msm
Name of the 64 bit merge module mvIMPACT_AcquireTools.x64.msm
Requirement Only needed if tools like wxPropView or mvDeviceConfigure shall be available

This merge module has configuration options: Define a property CREATE_DESKTOP_SHORTCUTS in your installation and pass the value of this property to the merge module if you want desktop icons to be created for the tools. Define a property FILTER_INSTALL_PARAMS and feed it with a string containing arbitrary command line parameters to be sent to mvGigEConfigure when starting the system the next time. See installation options further down in this chapter for additional details.

DirectShow support for mvIMPACT Acquire compliant devices
Name of the 32 bit merge module mvDirectShow_acquireDriver.msm
Name of the 64 bit merge module mvDirectShow_acquireDriver.x64.msm
Requirement Only needed if the application requires a DirectShow interface
VisionPro support for mvIMPACT Acquire compliant devices
Name of the 32 bit merge module mvIMPACT_Acquire_Cognex_Adapter.msm
Name of the 64 bit merge module mvIMPACT_Acquire_Cognex_Adapter.x64.msm
Requirement Only needed if the device shall be operated using VisionPro
NeuroCheck 6 support for mvIMPACT Acquire compliant devices
Name of the 32 bit merge module mvIMPACT_Acquire_NeuroCheck6_Adapter.msm
Name of the 64 bit merge module mvIMPACT_Acquire_NeuroCheck6_Adapter.x64.msm
Requirement Only needed if the device shall be operated using NeuroCheck 6. Files will only be installed if an existing NeuroCheck 6 installation can be detected in at least one of the ProgramFiles folders
NeuroCheck 6.1 support for mvIMPACT Acquire compliant devices
Name of the 32 bit merge module mvIMPACT_Acquire_NeuroCheck6_1_Adapter.msm
Name of the 64 bit merge module mvIMPACT_Acquire_NeuroCheck6_1_Adapter.x64.msm
Requirement Only needed if the device shall be operated using NeuroCheck 6.1. Files will only be installed if an existing NeuroCheck 6.1 installation can be detected in at least one of the ProgramFiles folders

mvBlueCOUGAR, mvBlueFOX3, mvBlueNAOS

User mode driver
Name of the 32 bit merge module mvGenTL-AcquireDriver.msm
Name of the 64 bit merge module mvGenTL-AcquireDriver.x64.msm
Requirement Must be installed. To use the user mode driver as a GenTL Producer you must create or append the corresponding environment variables (see Environment Variables below).
C/C++ runtime
Name of the 32 bit merge modules Microsoft_VC120_CRT_x86.msm
Name of the 64 bit merge modules Microsoft_VC120_CRT_x64.msm
Requirement Must be installed. To run 32 bit applications on 64 bit systems, the 32 bit merge modules must be installed as well
GenICam runtime
Name of the 32 bit merge module GenICamRuntime.msm
Name of the 64 bit merge module GenICamRuntime.x64.msm
Requirement Must be installed. The GenICam runtime needed to operate any device the complies with the GenICam standard that shall be used through the mvGenTL-Acquire driver package.

Installation Options

When the original installer of the mvGenTL_Acquire driver package is used, the user will be prompted to restart the system at the end of the installation. During reboot then the GigE Vision Filter Driver is installed by mvGigEConfigure.exe. When all the appropriate merge modules have been integrated into the setup, this will also happen in custom installations. Sometimes user interaction during the installation is or is not desired and/or GUI based tools shall not be displayed. This can be achieved by changing a public property of the installer's internal data base.

An installation of the driver without any user interaction can be achieved like this from the command line:

mvGenTL_Acquire-x86-2.2.2.exe /quiet /forcerestart

This will install the driver, reboot the system and install the filter driver and will display the GigEConfigure tool to the user and will display some status information during the installation. Please note that you have to call the install engine from an administrator shell in order to get this working properly. Valid values for the 'FILTER_INSTALL_PARAMS' property are all valid command line options for the mvGigEConfigure tool.

Apart from that there are some other public properties, which can be tailored to suit the needs of the application:

  • GEV_SUPPORT (Valid values: yes, no)
  • GEV_NDIS_DRIVER_INSTALL (Valid values: yes, no)
  • PCIE_SUPPORT (Valid values: yes, no)
  • U3V_SUPPORT (Valid values: yes, no)

These properties control whether the corresponding kernel drivers will be installed on the target system or not. The default for each property is displayed in bold.

So e.g. to install the GEV driver only you can call the MSI engine like this:

mvGenTL_Acquire-x86-2.2.2.exe /quiet /forcerestart U3V_SUPPORT=no GEV_SUPPORT=yes PCIE_SUPPORT=no

To copy all the GEV driver and tools related files to the target system only without actually installing the filter driver you can call the MSI engine like this:

mvGenTL_Acquire-x86-2.2.2.exe /quiet /forcerestart GEV_NDIS_DRIVER_INSTALL=no
Note
Please note that setting GEV_SUPPORT to no will superimpose the GEV_NDIS_DRIVER_INSTALL property so combining GEV_SUPPORT=no and GEV_NDIS_DRIVER_INSTALL=yes does not make any sense!

When only the U3V driver shall be support in silent mode call msiexec like this:

mvGenTL_Acquire-x86-2.2.2.exe /quiet /forcerestart U3V_SUPPORT=yes GEV_SUPPORT=no PCIE_SUPPORT=no

Configuring the filter driver installation tool then is not necessary, as it is only needed for GEV support.

GigE Vision Device Specific

Kernel mode driver
Name of the 32 bit merge module mvGigECaptureDriver.msm
Name of the 64 bit merge module mvGigECaptureDriver.x64.msm
Requirement Should be installed for optimal performance. Needs additional work (Filter driver must be installed either by using mvGigEConfigure.exe or another appropriate method). See Non-MSI based section about installing the GEV driver for details.
GigE Vision specific tools
Name of the 32 bit merge module mvGigETools.msm
Name of the 64 bit merge module mvGigETools.x64.msm
Requirement Should be installed for optimal performance. Contains tools that can be used to install/remove/enable/disable the filter driver and to set up GigE Vision compliant devices. In order to automatically install the driver some environment variables must be set (see Environment Variables below).

This merge module has a configuration option: Define a property CREATE_DESKTOP_SHORTCUTS in your installation an pass the value of this property to the merge module if you want desktop icons to be created for the tools.

Technical manuals for GigE Vision devices
Name of the 32 bit merge module mvBlueCOUGARDocumentation.msm
Name of the 64 bit merge module mvBlueCOUGARDocumentation.x64.msm
Requirement Only needed if technical manuals for mvBlueCOUGAR devices shall be available

USB3 Vision Device Specific

Kernel mode driver
Name of the 32 bit merge module mvUSB3VisionKernelDriver.msm
Name of the 64 bit merge module mvUSB3VisionKernelDriver.x64.msm
Requirement Must be installed for USB3 Vision support.
Firmware updates for USB3 Vision devices
Name of the 32 bit merge module mvBlueFOX3Update.msm
Name of the 64 bit merge module mvBlueFOX3Update.x64.msm
Requirement Only needed if firmware files to update mvBlueFOX3 devices shall be available
Technical manuals for USB3 Vision devices
Name of the 32 bit merge module mvBlueFOX3Documentation.msm
Name of the 64 bit merge module mvBlueFOX3Documentation.x64.msm
Requirement Only needed if technical manuals for mvBlueFOX3 devices shall be available

mvBlueNAOS Specific

Kernel mode driver and GenTL Producer
Name of the 32 bit merge module So far a 32-bit version of this device driver doesn't exist!
Name of the 64 bit merge module mvBlueNAOSDriver.x64.msm
Requirement Must be installed to work with mvBlueNAOS (Labs) devices.
Technical manuals for mvBlueNAOS (Labs) devices
Name of the 32 bit merge module mvBlueNAOSDocumentation.msm
Name of the 64 bit merge module mvBlueNAOSDocumentation.x64.msm
Requirement Only needed if technical manuals for mvBlueNAOS (Labs) devices shall be available. Please note that right now a 32-bit driver for mvBlueNAOS (Labs) devices doesn't exist!

mvBlueFOX

Kernel mode driver
Name of the 32 bit merge module mvBlueFOXKernelDriver.msm
Name of the 64 bit merge module mvBlueFOXKernelDriver.x64.msm
Requirement Must be installed.
User mode driver
Name of the 32 bit merge module mvBlueFOXDriver.msm
Name of the 64 bit merge module mvBlueFOXDriver.x64.msm
Requirement Must be installed
Technical manuals for mvBlueFOX devices
Name of the 32 bit merge module mvBlueFOXDocumentation.msm
Name of the 64 bit merge module mvBlueFOXDocumentation.x64.msm
Requirement Only needed if technical manuals for mvBlueFOX devices shall be available

mvHYPERION

Kernel mode driver
Name of the 32 bit merge module mvHYPERIONKernelDriver.msm, mvSerialPortKernelDriver.msm
Name of the 64 bit merge module mvHYPERIONKernelDriver.x64.msm, mvSerialPortKernelDriver.x64.msm
Requirement Must be installed.
User mode driver
Name of the 32 bit merge module mvHYPERIONDriver.msm
Name of the 64 bit merge module mvHYPERIONDriver.x64.msm
Requirement Must be installed
Technical manuals for mvHYPERION devices
Name of the 32 bit merge module mvHYPERIONDocumentation.msm
Name of the 64 bit merge module mvHYPERIONDocumentation.x64.msm
Requirement Only needed if technical manuals for mvHYPERION devices shall be available
CameraLink communication
Name of the 32 bit merge module mvCameraLinkCommunication.msm
Name of the 64 bit merge module mvCameraLinkCommunication.x64.msm
Requirement Only needed if the application wants to establish serial communication to CameraLink cameras

This merge module has configuration options. Define CL_COM_LIB_PATH_PROP (or CL_COM_LIB_PATH_PROP and CL_COM_LIB_PATH_PROP_X86 for 64-bit systems) and set it/them to the desired path(es). Refer to the CameraLink specification for details.

mvTITAN, mvGAMMA

Kernel and User mode driver
Name of the 32 bit merge module mvTITANDriver.msm, mvInstinfTool.msm, mvSDKDriverCommonFiles.msm, mvSetDMATool.msm
Name of the 64 bit merge module mvTITANDriver.signed.x64.msm, mvSDKDriverCommonFiles.msm, mvSDKTITANKernelDriver.x64.msm, mvSDKTITANUserModeDriver.x64.msm, mvSetDMATool.msm (this is the 32-bit version, 64-bit support not available)
Requirement Must be installed.
Technical manuals for mvTITAN and mvGAMMA devices
Name of the 32 bit merge module mvTITANDocumentation.msm
Name of the 64 bit merge module mvTITANDocumentation.x64.msm
Requirement Only needed if technical manuals for mvTITAN and mvGAMMA devices shall be available
CameraLink communication
Name of the 32 bit merge module mvCameraLinkCommunication.msm
Name of the 64 bit merge module mvCameraLinkCommunication.x64.msm
Requirement Only needed if the application wants to establish serial communication to CameraLink cameras

mvDELTA, mvSIGMA

Kernel and User mode driver
Name of the 32 bit merge module mvSIGMADriver.msm, mvInstinfTool.msm, mvSDKDriverCommonFiles.msm, mvSetDMATool.msm
Name of the 64 bit merge module mvSIGMADriver.signed.x64.msm (both 32-bit and 64-bit mvIMPACT Acquire user mode driver), mvSDKDriverCommonFiles.x64.msm, mvSetDMATool.msm (this is the 32-bit version, 64-bit support not available), mvSIGMAUserModeDriver.x64.msm, mvSDKSIGMAKernelDriver.x64.msm
Requirement Must be installed.
User mode driver(DEPRECATED)
Name of the 32 bit merge module NOT AVAILABLE
Name of the 64 bit merge module mvSIGMAUserModeDriver.msm
Requirement Should not be installed anymore. This is a deprecated merge module just provided for backward compatibility in order not to break existing installer build scripts. It contains the 32-bit user mode drivers to access boards belonging to this family. New installations should install mvSIGMAUserModeDriver.x64.msm instead. Do NOT install both mvSIGMAUserModeDriver.msm and mvSIGMAUserModeDriver.x64.msm on a system. This will break the MSI engines reference counting leaving files on the system after removing the package
Technical manuals for mvSIGMA and mvDELTA devices
Name of the 32 bit merge module mvSIGMADocumentation.msm
Name of the 64 bit merge module mvSIGMADocumentation.x64.msm
Requirement Only needed if technical manuals for mvSIGMA and mvDELTA devices shall be available

mvVirtualDevice

For mvVirtualDevice devices:

User mode driver
Name of the 32 bit merge module mvVirtualDeviceDriver.msm
Name of the 64 bit merge module mvVirtualDeviceDriver.x64.msm
Requirement Must be installed
Technical manuals for mvVirtualDevice devices
Name of the 32 bit merge module mvVirtualDeviceDocumentation.msm
Name of the 64 bit merge module mvVirtualDeviceDocumentation.x64.msm
Requirement Only needed if technical manuals for mvVirtualDevice devices shall be available
Note
This is the recommended way of redistributing the product driver files when the original driver package can't or shall not be used.

Running Customized %mvIMPACT Acquire MSI Installers From Other Installation Frameworks

If other installation frameworks such as Inno Setup or NSIS (Nullsoft Scriptable Install System) are used then sometimes using merge modules (*.msm files) is not an option as it is not supported by the installation framework. In such cases there are 3 ways to go:

  • Directly ship all the mvIMPACT Acquire MSI packages that contain drivers that shall be installed on the target system
  • Embed all the original mvIMPACT Acquire MSI packages that contain drivers that shall be installed on the target system into the installer of the client application and run the installers during the installation of the application
  • Embed all the files belonging to the mvIMPACT Acquire framework that are needed to access the hardware that shall run on the target system into the installer of the client application. This approach is covered in the next section

How to launch an installation from another installation with no user interaction has been already discussed Unattended Setups here. However when the mvIMPACT Acquire MSI installers are embedded into another installation simply running these installers might no always result in only the desired files being installed but also the header files, documentation and other features unwanted on a defined target system.

So only installing the files needed by an application does require to modify one or more of the following properties when launching the mvIMPACT Acquire installation:

  • ADDLOCAL (The value of the ADDLOCAL property is a list of features that are delimited by commas, and are to be installed locally)
  • REMOVE (The value of the REMOVE property is a list of features delimited by commas that are to be removed. These refers to features which are already installed on the target system, thus this property can be used to remove one or more features of a certain package)
  • INSTALLLEVEL (The INSTALLLEVEL property is the initial level at which features are selected "ON" for installation by default)

For details refer to the documentation about these properties in the MSDN (http://msdn.microsoft.com).

So one way to go would be to switch off ALL features by setting the INSTALLLEVEL property to 0 and then add all those features needed by the application by providing a list of these features to the ADDLOCAL property:

// for *.msi files
msiexec /i myInstaller.msi INSTALLLEVEL=0 ADDLOCAL="mvBlueFOXDriverModule,Documentation,DotNETSupport,SDKHeader" /quiet /forcerestart

When e.g. running the mvBlueFOX installer with the following command line

msiexec /i mvBlueFOX-x86-2.4.1.msi INSTALLLEVEL=0 ADDLOCAL="mvBlueFOXDriverModule,Documentation,DotNETSupport,SDKHeader"

results in the following features being pre-selected:

To obtain the names of the features to be installed any tool that can analyze an MSI-files database can be used. The following screenshot was taken by Orca, which is a tool for authoring MSI files that can be downloaded from Microsoft™ free of charge.

On the other hand to remove one or more features belonging to a known installer on the target system can be accomplished using the REMOVE property. So to e.g. remove the .NET support and the technical manual for mvBlueFOX devices the following command line can be used:

msiexec /i mvBlueFOX-x86-2.4.1.msi REMOVE="Documentation,DotNETSupport" /quiet

Non-MSI Based Setup Routines

Note
If not specified, all files can be found in the folder which contains the driver files.

Other setup routines should NOT include the driver files if this can be avoided, as this might cause version conflicts when the original installation package is installed as well and might also confuse the MSI engine when removing the original installation package, which might cause an incomplete package removal operation. However if this approach is desired this section provides a brief list of things that must be done of the target machine.

Common Files Needed For All Device Drivers

To run a MATRIX VISION device with the mvIMPACT Acquire interface some common files are needed for every device on the target system:

  • mvPropHandling.dll
  • mvDeviceManager.dll

Both files can be found in "$(windir)\system32" (32 bit version) and/or "$(windir)\SysWOW64" (64 bit version).

As the user mode part of the device driver internally make use of Open MP (http://openmp.org/) on Windows a matching version of the Open MP runtime must be installed on the target system as well. Current versions of the drivers are linked against version 12.0.21005.1 of the runtime. The corresponding merge modules or redistributables can be obtained from Microsoft

Note
Since release 1.8.0 of the mvIMPACT Acquire interface the file libexpat.dll is no longer shipped with the installation package, as it is no longer needed by any of the modules belonging to the mvIMPACT Acquire interface. This might force you to modify your installer.

All these files can be either be copied somewhere in the systems path or into the applications directory.

With these files the device can be used and configured from an application. Some features however require some additional installation work:

General Considerations When Shipping Kernel Drivers

In general any version of Windows requires you to install properly signed kernel/device drivers. Unfortunately the signature requirements did change over the years and therefore different Windows version require differently signed drivers. The actual kernel driver is always the same in almost every scenario however the signature attached to the file is NOT and therefore the full file is different. When working with the *.msm-files for the driver installation the merge modules internal logic will detect the version of Windows the installation is running on and will then install the matching version of the device driver. Internally this is achieved by putting EVERY version of the kernel driver into the merge module and then only the correct version gets installed. When not using the merge modules this has to be implemented as well. If just a single version of Windows is targeted the easiest approach is to install the mvIMPACT Acquire package on that system and get the related driver files from the full installation. Which files are needed for which device is described further down in this chapter. Right now mvIMPACT Acquire usually comes with drivers for the following versions of Windows:

Windows versionUsed Signature
XP and Server 2003SHA1
Vista, 7, 8, 8.1, 10(smaller than release 1607) and Server 2008SHA256
Windows 10 greater or equal version 1607SHA256 EV

See Windows as well!

Displaying Image Data

In case an application makes use of the mvDisplay.dll library this must be deployed on the target system as well. The same restrictions, path informations, etc. as in the previous section apply.

Load/Store Settings

In order to allow the application to load and store settings in the registry these keys must be created during the installation:

  • "HKEY_LOCAL_MACHINE\Software\MATRIX VISION\Settings"
  • "HKEY_CURRENT_USER\Software\MATRIX VISION\Settings"

If the keys are missing settings can still be loaded and stored in the platform independent XML format by using the appropriate functions discussed in the chapters describing the software interface.

Log-file Support

If your application shall be able to generate *.log-files the following directories must be created on the target system:

  • "%ALLUSERS%\Documents\MATRIX VISION"
  • "%ALLUSERS%\Documents\MATRIX VISION\mvIMPACT acquire"
  • "%ALLUSERS%\Documents\MATRIX VISION\mvIMPACT acquire\Logs"

Apart from that these files must be installed to "%ALLUSERS%\Documents\MATRIX VISION\mvIMPACT acquire\Logs\":

  • mvDebugFlags.mvd
  • logo.gif
  • mvIMPACT_acquireLogFile.xsl
  • mvLogFileViewer.html
  • sarissa.js
  • Apache.txt (this must be shipped with mvLogFileViewer.html and sarissa.js for legal reasons as part of the file make use of code under the Apache 2.0 license)

The first file is discussed in detail in the logging chapter of this manual, the latter files are only needed if the standard MATRIX VISION log-file style shall be used(XML with stylesheet transformation). To find out how to embed your own log-file stylesheet please refer to the chapter about the logging mechanism. Here it also explained how to create plain XML log files and XML files that can be viewed using mvLogFileViewer.html.

Camera Description Files Support (Frame Grabbers)

If your application shall be able to work with camera description files and does NOT modify the property mvIMPACT::acquire::Device::customDataDirectory before initialising the device the following directories must be created on the target system:

  • "%ALLUSERS%\Documents\MATRIX VISION"
  • "%ALLUSERS%\Documents\MATRIX VISION\mvIMPACT acquire"
  • "%ALLUSERS%\Documents\MATRIX VISION\mvIMPACT acquire\CameraFiles"

All camera description files that shall be used by the application must be installed into the folder CameraFiles in order to be recognized by the driver.

Java Support

In case an application makes use of the Java to mvIMPACT Acquire native interface the mvIMPACT_Acquire.java.dll library must be deployed on the target system as well. The same restrictions, path informations, etc. as in the Common Files Needed For All Device Drivers section apply.

mvBlueCOUGAR, mvBlueFOX3, mvBlueNAOS

  • mvGenTLConsumer.dll can be copied somewhere in the systems path or into the applications directory (in the standard installation, the file can be found in "$(windir)\system32" [32 bit version] and/or "$(windir)\SysWOW64" [64 bit version])
  • mvGenTLProducer.cti can be copied somewhere in the systems path or into the applications directory

GigE Vision Device Specific (Windows 7 And Smaller)

If the GigE Vision™ capture filter kernel mode driver shall be used the following files must be shipped as well:

  • mvGigECapture.inf (matching the target platform)
  • mvGigECapturem.inf (matching the target platform)
  • mvGigECapture_x86.cat or mvGigECapture_amd64.cat
  • mvGigECapturem_x86.cat or mvGigECapturem_amd64.cat
  • mvGigECapture.sys (matching the target platform)
Note
Please note that the file mvGigECapture.sys that is installed on the target system will differ from Windows version to Windows version. Currently Windows 2000 will need a different version of this file than newer versions of Windows. To obtain the correct file needed for the target platform the original installer must be installed on the system in question. Thus to build an installer for Windows 2000 the *.sys-file must be obtained from a Windows 2000 system. When working with the merge modules this will be done automatically.

GigE Vision Device Specific (Windows 8 And Newer)

If the GigE Vision™ capture filter kernel mode driver shall be used the following files must be shipped as well:

  • mvGigECapture2.inf
  • mvGigECapture2_x86.cat or mvGigECapture2_amd64.cat
  • mvGigECapture2.sys

GigE Vision Device Specific (Installation)

To actually install the filter driver on the system there are 2 ways to go: Either the tool mvGigEConfigure.exe or the built-in mechanism of Windows to install a filter driver can be used.

Using mvGigEConfigure there are again 2 possibilities:

  1. The user interactive version by simply starting the tool and then clicking Install driver or Remove driver and/or by right-clicking on a network connection entry to enable/disable the filter driver.
  2. By using the command line options available for the tool. For details please have a look into the GUI section for mvGigEConfigure in the technical manual of the corresponding product.

Using the built-in mechanism of Windows works like this:

First navigate to any of the network connections available to the system and open the properties dialog of that connection.

Figure 3: Network connection properties

Here click on Install...

In the next Windows select Service and click on Add....

Figure 4: Network component type selection

Now click on Have Disk....

Figure 5: Network service selection

Click on Browse... and navigate to the folder containing the GigE Vision™ capture filter kernel mode driver files mentioned above.

Figure 6: Install from disc

Select the file mvGigECapture.inf and click on Open

Figure 7: Locate file

Click on OK

Figure 8: Select network service

Now depending on the amount of network connections installed in your system and depending on the version of Windows you are working with a couple of warnings might appear that must be confirmed with something like Continue anyway.

Figure 9: Software installation

Afterwards the filter driver will installed and active on EVERY network connection of the system. If that is not desired, it can be enable and disabled from the properties dialog of the network connection that shall be modified by checking or unchecking the box in from of the MATRIX VISION filter driver entry.

Figure 10: Software installation

USB3 Vision Device Specific

For USB3 Vision™ device support the following files(correctly signed for the target platform) must be shipped as well:

For 32-bit support:

  • mvUSB3Vision.inf
  • mvUSB3Vision.cat
  • x86/libusbK_x86.dll
  • x86/libusb0_x86.dll
  • x86/libusbK.sys
  • x86/WdfCoInstaller01009.dll

For 64-bit support:

  • mvUSB3Vision.inf
  • mvUSB3Vision.cat
  • x86/libusbK_x86.dll
  • x86/libusb0_x86.dll
  • amd64/libusbK.sys
  • amd64/libusbK.dll
  • amd64/libusb0.dll
  • amd64/WdfCoInstaller01009.dll

The relative folder structure is vital! Installation of the kernel module will fail if this does not match!

paragraph InstallationFromPrivateSetupRouinesWindowsNonMSI_GEV_U3V_PCIe_PCIe mvBlueNAOS Device Specific

For mvBlueNAOS (Labs) device support the following files(correctly signed for the target platform) must be shipped as well:

For 32-bit support:

Attention
Right now there is no 32-bit version of the driver package!

For 64-bit support:

  • WdfCoInstaller01009.dll
  • mvBlueNAOS.inf
  • mvBlueNAOS.cat
  • mvBlueNAOS.sys

GenICam Runtime

Apart from that, the GenICam runtime this driver has been linked with must be installed on the target system. The runtime modules are contained in the merge modules belonging to this driver package.

Note
Please do NOT use the official runtime installer that can be downloaded from www.genicam.org. This has been compiled with a different version of Visual Studio an cannot be used to operate the mvIMPACT Acquire GenTL consumer. Only use the libraries that come with this installation package that are stored under the installation folder in the sub-directory Toolkits/GenICam_v<major>_<minor>

The driver will try to locate the GenICam runtime in $(MVIMPACT_ACQUIRE_DIR)/Toolkits/GenICam_v<major>_<minor> thus if you plan to distribute the runtime in a different way you need to setup you environment accordingly as described by the GenICam standard.

Note
MATRIX VISION does NOT recommend this approach. The merge modules provided by MATRIX VISION should be used instead!

mvBlueFOX

  • mvBlueFOX.dll can be copied somewhere in the systems path or into the applications directory

In the standard installation, the file can be found in "$(windir)\system32" (32 bit version) and/or "$(windir)\SysWOW64" (64 bit version).

The files belonging to the kernel driver

  • amvBlueFOX2.inf must be copied into the Windows inf folder
  • mvBlueFOX2.sys must be copied into the Windows drivers folder
  • mvBlueFOX2.cat (signed catalog file for the mvBlueFOX2.sys module)
Note
The leading 'a' in the file name amvBlueFOX2.inf is NOT a mistake. The reason for this strange file name is that Windows 2000 by default uses the first *.INF-file in an alphabetical search that matches the detected device. As previous versions of this driver package contained 2 versions of the kernel driver, the 'older' versions *.INF-files name was mvBlueFOX.inf and in order to install the newer version of the kernel driver as a default driver the new *.INF-file must be found before the old one as Windows does not list all available drivers but only the first one detected.

The kernel driver files should be installed BEFORE connecting the device to the target system the first time as then Windows automatically detects the driver.

.cat files can't just be copied into some system specific directory. Please refer to the corresponding documentation by Microsoft.

In addition to this a Windows driver framework co-installer is needed. This file must be copied into the Windows system (system32) folder. Both the 32-bit and the 64-bit version of the driver need 'WdfCoinstaller01009.dll' for the driver installation. If the co-installer is not present on the target system they must be copied as well.

Experienced users are encouraged to use the Microsoft Driver install Framework for applications to deploy this driver on the target system (http://msdn.microsoft.com/en-us/library/ms790295.aspx). This is the recommended way for installing device drivers.

These files alone will correctly install the mvBlueFOX as a recognized device on the target system. However to access the device from any kind of application the base libraries for the mvIMPACT Acquire interface will be needed as well.

mvVirtualDevice

  • mvVirtualDevice.dll can be copied somewhere in the systems path or into the applications directory

In the standard installation, the file can be found in "$(windir)\system32" (32 bit version) and/or "$(windir)\SysWOW64" (64 bit version).

mvHYPERION

  • mvHYPERION.sys (kernel driver for mvHYPERION-CLb and mvHYPERION-CLe boards)
  • mvHYPERION.inf (installation file for mvHYPERION-CLb and mvHYPERION-CLe boards)
  • mvHYPERION_x86.cat (signed catalog file for the mvHYPERION.sys module on 32 bit Windows™ systems)
  • mvHYPERION_amd64.cat (signed catalog file for the mvHYPERION.sys module on x64 Windows™ systems)
  • mvHYPERION2.sys (kernel driver for mvHYPERION-CLm and mvHYPERION-CLf boards)
  • mvHYPERION2.inf (installation file for mvHYPERION-CLm and mvHYPERION-CLf boards)
  • mvHYPERION2_x86.cat (signed catalog file for the mvHYPERION2.sys module on 32 bit Windows™ systems)
  • mvHYPERION2_amd64.cat (signed catalog file for the mvHYPERION2.sys module on x64 Windows™ systems)
  • mvSAlloc.sys (sub allocator module for any of the mvHYPERION kernel driver modules)
  • mvSerialPort.sys (kernel driver for serial ports provided by any mvHYPERION board)
  • mvSerialPort.inf (installation file for the serial port driver)
  • mvSerialPort_x86.cat (signed catalog file for the mvSerialPort.sys module on 32 bit Windows™ systems)
  • mvSerialPort_amd64.cat (signed catalog file for the mvSerialPort.sys module on x64 Windows™ systems)

These files must somehow be accessible during the installation procedure. Therefore they should be copied to some temporary location or somewhere into the target directory. In order to install the low level hardware driver then the normal driver installation procedures can be used. MATRIX VISION recommends using the mechanisms available in the Microsoft Driver Install Frameworks (DIFx) for installing the kernel driver. Please note that the mvHYPERION driver files are signed via the *.cat file. This will be needed in order to load kernel mode code on Windows Vista x64 and presumably every other new operating system published by the Microsoft company.

These files alone will correctly install any mvHYPERION device currently present in the system as a recognized device. For devices added to the system later on the steps described above MUST be repeated.

The next time you start the system after connecting the devices to the target motherboard the Windows plug and play manager will inform the user about newly unknown hardware devices and will offer to install these devices. You can either cancel this operation OR (if all the files mentioned above are still present on the target system) you can follow the plug and play wizards dialogs and can specify the mvhyperion.inf file when the system asks for it OR (if you have used the DIFx) don't do anything as the system will handle the new device correctly.

For applications, that communicate via the CameraLink serial interface with the camera these files will be needed as well:

  • clsermv.dll (can be copied somewhere in the systems path or into the applications directory)
  • clsermvg.dll (can be copied somewhere in the systems path or into the applications directory)
  • clsermv.h (only needed for CameraLink devices when communication applications via CameraLink shall be compiled on this platform)

To access the device from any kind of application based on the mvIMPACT Acquire interface the base libraries for the mvIMPACT Acquire interface together with the device specific interface library

  • mvHYPERIONfg.dll (can be copied somewhere in the systems path or into the applications directory; in the standard installation, the file can be found in "$(windir)\system32" [32 bit version] and/or "$(windir)\SysWOW64" [64 bit version])

will be needed as well.

mvDELTA, mvSIGMA

  • matrixfg.sys (only needed for Windows NT based systems (NT4, 2000, XP))
  • matrixfg.vxd (only needed for Windows98)
  • mvmm.exe (only needed for Windows98)
  • mvmmrun.bat (only needed for Windows98)
  • oswin32.dll
  • setdma.exe (only needed for Windows NT based systems (NT4, 2000, XP))
  • instinf.exe
  • mvsl32.dll (in the standard installation, the file can be found in "$(windir)\system32" [32 bit version] and/or "$(windir)\SysWOW64" [64 bit version])
  • mvsigma.sys (only needed for Windows NT based systems (NT4, 2000, XP))
  • mvsl32.inf

All these files must somehow be accessible during the installation procedure. Therefore they should be copied to some temporary location or somewhere into the target directory. In order to install the low level hardware driver then the executable instinf.exe must be called with the name of the *.inf file for this driver:

instinf.exe %FOLDER_CONTAINING_THE_DRIVER_FILES/mvsl32.inf

This will start the MATRIX VISION driver installation. However as the system MUST be restarted afterwards, the low level driver installer will schedule a reboot request after this installation. If you want to suppress this and reboot the system after your application has been installed completely call instinf.exe with the parameter /nr:

instinf.exe /nr %FOLDER_CONTAINING_THE_DRIVER_FILES/mvsl32.inf

After executing instinf.exe successfully the temporary files can be removed from the target system again, as the installer creates copies of these files in the correct target directories depending on the version of Windows.

Afterwards every device belonging to this device family will be correctly installed on this system. To verify this you can move to the Windows device manager.

These files alone will correctly install any mvDELTA or mvSIGMA device currently present in the system as a recognized device. For devices added to the system later on the steps described above MUST be repeated.

The next time you start the system after connecting the devices to the target motherboard the Windows plug and play manager will inform the user about newly unknown hardware devices and will offer to install these devices. You can either cancel this operation OR (if all the files mentioned above are still present on the target system) you can follow the plug and play wizards dialogs and can specify the mvsl32.inf file when the system asks for it.

To access the device from any kind of application based on the mvIMPACT Acquire interface the base libraries for the mvIMPACT Acquire interface together with the device specific interface library

  • mvSIGMAfg.dll (can be copied somewhere in the systems path or into the applications directory)

will be needed as well.

mvTITAN, mvGAMMA

  • matrixfg.sys (only needed for Windows NT based systems (NT4, 2000, XP))
  • matrixfg.vxd (only needed for Windows98)
  • mvmm.exe (only needed for Windows98)
  • mvmmrun.bat (only needed for Windows98)
  • oswin32.dll
  • setdma.exe (only needed for Windows NT based systems (NT4, 2000, XP))
  • instinf.exe
  • mvtitan.bin
  • titan.bin
  • mvtitan.dll (in the standard installation, the file can be found in "$(windir)\system32" [32 bit version] and/or "$(windir)\SysWOW64" [64 bit version])
  • mvtitan.sys (only needed for Windows NT based systems (NT4, 2000, XP))
  • mvtitan.inf

All these files must somehow be accessible during the installation procedure. Therefore they should be copied to some temporary location or somewhere into the target directory. In order to install the low level hardware driver then the executable instinf.exe must be called with the name of the *.inf file for this driver:

instinf.exe %FOLDER_CONTAINING_THE_DRIVER_FILES/mvtitan.inf

This will start the MATRIX VISION driver installation. However as the system MUST be restarted afterwards, the low level driver installer will schedule a reboot request after this installation. If you want to suppress this and reboot the system after your application has been installed completely call instinf.exe with the parameter /nr:

instinf.exe /nr %FOLDER_CONTAINING_THE_DRIVER_FILES/mvtitan.inf

After executing instinf.exe successfully the temporary files can be removed from the target system again, as the installer creates copies of these files in the correct target directories depending on the version of Windows.

Afterwards every device belonging to this device family will be correctly installed on this system. To verify this you can move to the Windows device manager.

These files alone will correctly install any mvTITAN or mvGAMMA device currently present in the system as a recognized device. For devices added to the system later on the steps described above MUST be repeated.

The next time you start the system after connecting the devices to the target motherboard the Windows plug and play manager will inform the user about newly unknown hardware devices and will offer to install these devices. You can either cancel this operation OR (if all the files mentioned above are still present on the target system) you can follow the plug and play wizards dialogs and can specify the mvtitan.inf file when the system asks for it.

For applications, that communicate via the CameraLink serial interface with the camera these files will be needed as well:

  • clsermv.dll (can be copied somewhere in the systems path or into the applications directory)
  • clsermvg.dll (can be copied somewhere in the systems path or into the applications directory)
  • clsermv.h (only needed for CameraLink devices when communication applications via CameraLink shall be compiled on this platform)

To access the device from any kind of application based on the mvIMPACT Acquire interface the base libraries for the mvIMPACT Acquire interface together with the device specific interface library

  • mvTITANfg.dll (can be copied somewhere in the systems path or into the applications directory)

will be needed as well.

Environment Variables

When not re-distributing the original mvIMPACT Acquire installation packages an application might need certain environment variables in order to run properly. As not every possible setup needs any of the variables described here, they will not be created by default, but must be added as needed to a custom client installer. This chapter briefly explains all environment variables that are important when deploying a mvIMPACT Acquire based application.

Common Environment Variables

MVIMPACT_ACQUIRE_DIR

The MVIMPACT_ACQUIRE_DIR variable is needed by some applications in order to locate certain files. E.g. mvGigEConfigure will use this variable to locate the GigE Vision capture driver when the tool is used to install the driver. Also the mvDeviceManager library needs it in order to set up some process local environment variables relative to it. Thus without this variable GenICam compliant devices (mvBlueCOUGAR, mvBlueFOX3) cannot be operated. The variable must point to the root folder of the mvIMPACT Acquire related modules.

MVIMPACT_ACQUIRE_DATA_DIR

The MVIMPACT_ACQUIRE_DATA_DIR variable is needed in order to setup the cache path for GenICam XML files as well as for locating camera descriptions files used by frame grabbers (mvHYPERION, mvTITAN, mvGAMMA, mvSIGMA, mvDELTA). The folder pointed to should provide read AND write access for the user. The required folder structure below this folder should look like this:

  MVIMPACT_ACQUIRE_DATA_DIR
    |- CameraFiles <-- Store camera descriptions here
    |- GenICam     <-- Here pre-processed GenICam files will be stored by the %mvIMPACT Acquire runtime. This will speed up initialisation time of devices

mvBlueCOUGAR, mvBlueFOX3

GENICAM_GENTL32_PATH

The GENICAM_GENTL32_PATH variable is needed for reasons described in the GenICam GenTL specification (see GenICam downloads on the EMVA homepage (http://www.emva.org) to get a copy of the latest version OR use the one provided together with the installation archive you have installed the driver on your development system from). An application should always check whether this variable already exists as other applications might register it as well. Therefore every application shall only APPEND data to existing variables and shall only remove the part that was added without necessarily deleting the full variable. The variable shall contain the path to the folder containing 32-bit versions of *.cti (see above) files (typically located in the bin folder of the folder pointed to by MVIMPACT_ACQUIRE_DIR.

GENICAM_GENTL64_PATH

The GENICAM_GENTL64_PATH variable is needed for the very same reasons as the GENICAM_GENTL32_PATH variable when working with 64-bit applications and has the same requirements.

Linux

For Linux most of the stuff mentioned in Common Files Needed For All Device Drivers applies as well even though instead of *.dll files the corresponding *.so files have to be deployed on the target machine.

mvBlueCOUGAR, mvBlueFOX3

GenICam Runtime

For installation on a Linux-i686 system the files with the -i86 suffix must be extracted. On a Linux-x64_86 system the corresponding packages with the -x64.tgz suffix must be used.

mkdir /opt/genicam
tar xzvf GenICam_Runtime_gcc42_Linux32_i86_v3_1_0.tgz -C /opt/genicam

These variables must be added to the environment, e.g. by placing these lines in the .profile or .bashrc file.

export GENICAM_ROOT_V3_1=/opt/genicam
#if the next line shall work, $HOME/tmp must exist, which it does not by default, thus you might want to create it OR use the global 'tmp' folder
#export GENICAM_CACHE_V3_1=$HOME/tmp
export GENICAM_CACHE_V3_1=/tmp
export GENICAM_LOG_CONFIG_V3_1=$GENICAM_ROOT_V3_1/log/config-unix/DebugLogging.properties

In case you are developing applications using the GenICam SDK add the GenICam include path to your pre-processor options, e.g:

CPPFLAGS += $(GENICAM_ROOT_V3_1)/include
and the GenICam lib resp. lib64 path to your linker options, e.g:
ifeq ($(DEST),$(filter $(DEST),x86_64))
LIB_SUBDIR=bin/Linux64_x64
else
LIB_SUBDIR=bin/Linux32_i86
endif
LDFLAGS += $(GENICAM_ROOT_V3_1)/$(LIB_SUBDIR) -lGCBase_gcc40_v3_1 -lGenApi_gcc40_v3_1 -lMathParser_gcc40_v3_1 -lLog_gcc40_v3_1.'

Finally

$(GENICAM_ROOT_V3_1)/$(LIB_SUBDIR)

must somehow end up in the systems library search path thus you might want to add a file to

/etc/ld.so.conf.d/genicam.conf

containing the following line:

/opt/genicam/bin/Linux32_i86/

OR you can use a different mechanism.

Embedded Linux

The mvIMPACT Acquire runtime libraries (*.so) from the installation archive for your target machine (*.tgz) are sufficient for including the mvIMPACT Acquire driver into your own embedded Linux distribution. The following chapter will demonstrate how to achieve this via the Yocto Project.

Yocto Project

The Yocto Project is an open-source framework that helps users to create a custom Linux distribution. To use MATRIX VISION devices on your embedded system, you will need to create Bitbake recipes to package the mvIMPACT Acquire libraries which are already compiled by us for your target system, create Bitbake recipes to cross-compile and package your machine vision applications using the mvIMPACT Acquire API, and install these packages into your own Linux image. In this example, we will guide you through:

  • Package and install the mvIMPACT Acquire libraries for each device (i.e. mvBlueNAOS, USB3 Vision™ devices, GigE Vision™ devices, mvBlueFOX and mvVirtualDevice);
  • Cross-compile, package and install the mvIMPACT Acquire sample programs;
  • Configure and build the final image.

Install mvIMPACT Acquire Libraries

The Yocto Project uses a layer module (i.e. meta-layers) to logically modulate and separate metadata in a build. Therefore, it's a good pratice to create a meta-layer for the mvIMPACT Acquire driver packages and programs on top of your Linux distribution or on top of a BSP (Board Support Package) provided by your hardware manufacturer. Once the Yocto build environment and the base Linux distribution have been set, create a meta-layer in the source directory:

$ bitbake-layers create-layer meta-mvimpact-acquire

Once the mvIMPACT Acquire meta-layer has been created, open the conf/bblayers.conf file in the build directory and add the following line:

BBLAYERS += "${BSPDIR}/sources/meta-mvimpact-acquire"

Now it's time to install the mvIMPACT Acquire common runtime libraries and device-specific runtime libraries.

Install Common mvIMPACT Acquire Libraries

There are some libraries that are needed by every mvIMPACT Acquire driver:

  • mvDeviceManager.so
  • mvPropHandling.so
  • expat.so
  • freeimage.so

Therefore, if multiple device drivers are going to be installed on the target machine, it's better to install these common libraries by a separate Bitbake recipe.

Since these runtime libraries are shipped in both the GenICam GenTL specific and the mvBlueFOX specific mvIMAPCT Acquire installation archives, you first need to download the latest *.tgz archive for your target machine from the MATRIX VISION website (https://www.matrix-vision.com/treiber-software.html). In this demonstration, the mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz for an arm64 platform will be used.

Note
Please download the *.tgz file that is suitable for your devices and your target system. User log-in is required for downloading these files.

Once the installation archive has been downloaded, navigate to the source directory, copy the *.tgz file to the recipe directory and create a Bitbake recipe for installing the common runtime libraries:

$ cd meta-mvimpact-acquire && mkdir -p recipes-mvimpactacquire/mvimpact-acquire/files
$ cp -r ~/Downloads/mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz recipes-mvimpactacquire/mvimpact-acquire/files/
$ touch recipes-mvimpactacquire/mvimpact-acquire/mvimpact-acquire-base_2.44.0.bb

The demo Bitbake recipe mvimpact-acquire-base_2.44.0 looks like this:

SUMMARY = "Installs mvIMPACT Acquire base libraries"
DESCRIPTION = "This recipe installs mvIMPACT Acquire base libraries for all MATRIX VISION devices."
HOMEPAGE = "http://www.matrix-vision.de"
LICENSE_FLAGS = "EULA"
LICENSE_FLAGS_WHITELIST = "EULA"
LICENSE = "EULA"
LIC_FILES_CHKSUM = "file://${WORKDIR}/mvIMPACT_Acquire-ARM64-2.44.0/doc/EULA.txt;md5=f6f99507036166a5604b38e6df10f004"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}"
SRC_URI = "file://mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz"
TARGET = "arm64"
MVIA_SUBDIR = "opt/mvIMPACT_Acquire"
MVIA_LIB_SUBDIR = "lib"
TOOLKITS_LIB_SUBDIR = "Toolkits"
MV_DATA_DIR = "opt/mvIMPACT_Acquire/data"
do_install() {
# install mvIMPACT Acquire runtime binaries
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/FreeImage3160/bin/Release/FreeImage/${TARGET}
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvDeviceManager.so.${PV} ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvPropHandling.so.${PV} ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/Toolkits/expat/bin/${TARGET}/lib/*.so.* ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/Toolkits/FreeImage3160/bin/Release/FreeImage/${TARGET}/*.so ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/FreeImage3160/bin/Release/FreeImage/${TARGET}
# set environment variables for mvIMPACT Acquire
install -m 0755 -d ${D}${sysconfdir}/profile.d
echo 'export MVIMPACT_ACQUIRE_DIR=/opt/mvIMPACT_Acquire' >> ${D}${sysconfdir}/profile.d/acquire.sh
echo 'export MVIMPACT_ACQUIRE_DATA_DIR=/opt/mvIMPACT_Acquire/data' >> ${D}${sysconfdir}/profile.d/acquire.sh
# set library search paths for the dynamic linker
install -m 0755 -d ${D}${sysconfdir}/ld.so.conf.d
echo '/opt/mvIMPACT_Acquire/lib' >> ${D}${sysconfdir}/ld.so.conf.d/acquire.conf
echo '/opt/mvIMPACT_Acquire/Toolkits' >> ${D}${sysconfdir}/ld.so.conf.d/acquire.conf
# set up logfiles
install -m 0755 -d ${D}${base_prefix}/${MV_DATA_DIR}/logs
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/apps/mvDebugFlags.mvd ${D}${base_prefix}/${MV_DATA_DIR}/logs/
}
INHIBIT_PACKAGE_STRIP = "1"
INSANE_SKIP_${PN} += "dev-so \
already-stripped \
ldflags"
PACKAGES = "${PN} ${PN}-dev ${PN}-doc"
FILES_${PN} += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so.* \
${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/lib*.so.* \
${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/FreeImage3160/bin/Release/FreeImage/${TARGET}/lib*.so \
${sysconfdir}/profile.d/*.sh \
${sysconfdir}/ld.so.conf.d/*.conf"
FILES_${PN}-dev += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so \
${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/lib*.so"
FILES_${PN}-doc += "${base_prefix}/${MV_DATA_DIR}/logs"
Note
As a unique signature of a task's inputs, checksum indicates when the input data change. Therefore, you need to update the checksum of the license file if it has been changed. Run md5sum [file_name] to check the current MD5 checksum of the file and update it in your recipe.

After the recipe has been created, run bitbake to build it:

$ bitbake mvimpact-acquire-base

Install the mvIMPACT Acquire PCIe Kernel Module

The mvIMPACT Acquire PCIe kernel module is needed in order to use mvBlueNAOS devices. Before compiling the out-of-tree kernel module, run the configuration of the virtual kernel from the build directory to create a workspace directory containing the kernel source:

$ bitbake -c menuconfig virtual/kernel
Note
Since the mvIMPACT Acquire PCIe kernel module uses the userspace I/O driver, please make sure that it is marked as built-in or as module in the kernel configuration.

The source code of mvIMPACT Acquire PCIe kernel module is provided by the mvGenTL installation archive (version >= 2.44.0), therefore you first need to download the mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz from the MATRIX VISION website (https://www.matrix-vision.com/treiber-software.html). Assume the target platform is arm64. Skip this step if the same *.tgz has been downloaded during the previous step Install Common mvIMPACT Acquire Libraries.

$ cp -r ~/Downloads/mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz recipes-mvimpactacquire/mvimpact-acquire/files/

Now navigate to the source directory and create a Bitbake recipe for installing the mvIMPACT Acquire kernel module:

$ touch recipes-mvimpactacquire/mvimpact-acquire/mvpci-mod_2.44.0.bb

The demo Bitbake recipe mvpci-mod_2.44.0 looks like this:

SUMMARY = "Builds the mvBlueNAOS external Linux kernel module"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${WORKDIR}/mvIMPACT_Acquire-ARM64-2.44.0/kernelmodules/linux/mvBlueNAOS/LICENSE.txt;md5=c9a553786e1e606ea017be51e4ec1538 \
file://${WORKDIR}/mvIMPACT_Acquire-ARM64-2.44.0/kernelmodules/linux/mvBlueNAOS/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
inherit module
SRC_URI = "file://mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz"
S = "${WORKDIR}/mvIMPACT_Acquire-ARM64-2.44.0/kernelmodules/linux/mvBlueNAOS"
# The inherit of module.bbclass will automatically name module packages with
# "kernel-module-" prefix as required by the oe-core build environment.
RPROVIDES_${PN} += "kernel-module-mvpci"
Note
As a unique signature of a task's inputs, checksum indicates when the input data change. Therefore, you need to update the checksum of the license file if it has been changed. Run md5sum [file_name] to check the current MD5 checksum of the file and update it in your recipe.

After the recipe has been created, run bitbake to build it:

$ bitbake mvpci-mod

Install GenICam GenTL Specific mvIMPACT Acquire Libraries

Apart from the common mvIMPACT Acquire runtime libraries, you need to install the GenICam GenTL specific libraries from the mvGenTL installation archive in order to use USB3 Vision™ devices, GigE Vision™ devices or mvBlueNAOS devices. Therefore, download the mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz from the MATRIX VISION website (https://www.matrix-vision.com/treiber-software.html). Assume the target platform is arm64. Skip this step if the same *.tgz has been downloaded during the previous step Install Common mvIMPACT Acquire Libraries.

$ cp -r ~/Downloads/mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz recipes-mvimpactacquire/mvimpact-acquire/files/

Create a Bitbake recipe for installing GenICam GenTL specific mvIMPACT Acquire libraries:

$ touch recipes-mvimpactacquire/mvimpact-acquire/mvimpact-acquire-gentl_2.44.0.bb

The demo Bitbake recipe mvimpact-acquire-gentl_2.44.0 looks like this:

SUMMARY = "Installs GenICam GenTL specific mvIMPACT Acquire libraries"
DESCRIPTION = "This recipe installs mvIMPACT Acquire GenTL driver libraries for USB3 Vision, GigE Vision and mvBlueNAOS devices on ARM64 platforms."
HOMEPAGE = "http://www.matrix-vision.de"
LICENSE_FLAGS = "EULA"
LICENSE_FLAGS_WHITELIST = "EULA"
LICENSE = "EULA"
LIC_FILES_CHKSUM = "file://${WORKDIR}/mvIMPACT_Acquire-ARM64-2.44.0/doc/EULA.txt;md5=f6f99507036166a5604b38e6df10f004"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}"
SRC_URI = "file://mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz"
TARGET = "arm64"
MVIA_SUBDIR = "opt/mvIMPACT_Acquire"
MVIA_LIB_SUBDIR = "lib"
GENICAM_LIB_SUBDIR = "runtime"
TOOLKITS_LIB_SUBDIR = "Toolkits"
MV_DATA_DIR = "opt/mvIMPACT_Acquire/data"
RDEPENDS_${PN} += " mvimpact-acquire-base"
do_install() {
# install mvIMPACT Acquire runtime binaries and dependencies.
install -m 0755 -d ${D}${base_prefix}
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${GENICAM_LIB_SUBDIR}
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${GENICAM_LIB_SUBDIR}/bin/Linux64_ARM
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/libudev/bin/${TARGET}/lib
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/libusb-1.0.21/bin/${TARGET}/lib
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvGenTLConsumer.so.${PV} ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvGenTLProducer.so.${PV} ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvGenTLProducer.PCIe.so.${PV} ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvBlueNAOS-M.H.*.so ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/runtime/bin/Linux64_ARM/*.so ${D}${base_prefix}/${MVIA_SUBDIR}/${GENICAM_LIB_SUBDIR}/bin/Linux64_ARM
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/Toolkits/libudev/bin/${TARGET}/lib/*.so.* ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/libudev/bin/${TARGET}/lib
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/Toolkits/libusb-1.0.21/bin/${TARGET}/lib/*.so.* ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/libusb-1.0.21/bin/${TARGET}/lib
# create softlink for libmvGenTLProducer
cd ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
ln -sf libmvGenTLProducer.so libmvGenTLProducer.cti
ln -sf libmvGenTLProducer.PCIe.so libmvGenTLProducer.PCIe.cti
# set environment variables for mvIMPACT Acquire
install -m 0755 -d ${D}${sysconfdir}/profile.d
echo 'export GENICAM_ROOT=/opt/mvIMPACT_Acquire/runtime' >> ${D}${sysconfdir}/profile.d/genicam.sh
echo 'export GENICAM_ROOT_V3_1=/opt/mvIMPACT_Acquire/runtime' >> ${D}${sysconfdir}/profile.d/genicam.sh
echo 'export GENICAM_GENTL64_PATH=/opt/mvIMPACT_Acquire/lib' >> ${D}${sysconfdir}/profile.d/genicam.sh
echo 'export GENICAM_CACHE_V3_1=/opt/mvIMPACT_Acquire/runtime/cache/v3_1' >> ${D}${sysconfdir}/profile.d/genicam.sh
echo 'export GENICAM_LOG_CONFIG_V3_1=/opt/mvIMPACT_Acquire/runtime/log/config-unix/DefaultLogging.properties' >> ${D}${sysconfdir}/profile.d/genicam.sh
# set library search path for the dynamic linker
install -m 0755 -d ${D}${sysconfdir}/ld.so.conf.d
echo '/opt/mvIMPACT_Acquire/runtime/bin/Linux64_ARM' >> ${D}${sysconfdir}/ld.so.conf.d/genicam.conf
# define udev rules for USB3 Vision devices
install -m 0755 -d ${D}${sysconfdir}/udev/rules.d
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/Scripts/52-mvbf3.rules ${D}${sysconfdir}/udev/rules.d/
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/Scripts/52-U3V.rules ${D}${sysconfdir}/udev/rules.d/
# define udev rules for pcie cameras
install -m 0755 -d ${D}/usr/local/bin/
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/Scripts/51-udev-pcie.rules ${D}${sysconfdir}/udev/rules.d/
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/Scripts/make_device.sh ${D}/usr/local/bin/
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/Scripts/device_namer.sh ${D}/usr/local/bin/
# install GenICam Cache and Logs
cp -r ${S}/mvIMPACT_Acquire-ARM64-${PV}/runtime/cache ${D}${base_prefix}/${MVIA_SUBDIR}/${GENICAM_LIB_SUBDIR}
cp -r ${S}/mvIMPACT_Acquire-ARM64-${PV}/runtime/log ${D}${base_prefix}/${MVIA_SUBDIR}/${GENICAM_LIB_SUBDIR}
# set up GenICam cache and xml file location
install -m 0755 -d ${D}${base_prefix}/${MV_DATA_DIR}/genicam
# increase usb core memory for USB3 Vision devices
echo 'sh -c "echo 128 > /sys/module/usbcore/parameters/usbfs_memory_mb"' > ${D}${sysconfdir}/profile.d/usbfs_memory.sh
# increase GigE buffer size for GigE Vsion devices
install -m 0755 -d ${D}${sysconfdir}/sysctl.d
echo 'net.core.wmem_max=16777216' >> ${D}${sysconfdir}/sysctl.d/62-buffers-performance.conf
echo 'net.core.rmem_max=16777216' >> ${D}${sysconfdir}/sysctl.d/62-buffers-performance.conf
echo 'net.core.wmem_default=16777216' >> ${D}${sysconfdir}/sysctl.d/62-buffers-performance.conf
echo 'net.core.rmem_default=16777216' >> ${D}${sysconfdir}/sysctl.d/62-buffers-performance.conf
echo 'net.core.netdev_max_backlog=10000' >> ${D}${sysconfdir}/sysctl.d/62-buffers-performance.conf
echo 'net.ipv4.conf.all.rp_filter = 2' >> ${D}${sysconfdir}/sysctl.d/62-buffers-performance.conf
echo 'net.ipv4.conf.default.rp_filter = 2' >> ${D}${sysconfdir}/sysctl.d/62-buffers-performance.conf
}
INHIBIT_PACKAGE_STRIP = "1"
INSANE_SKIP_${PN} += "dev-so \
already-stripped \
ldflags"
PACKAGES = "${PN}-dbg ${PN} ${PN}-dev ${PN}-doc"
FILES_${PN} += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so.* \
${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/libmvBlueNAOS-M.H.*.so \
${base_prefix}/${MVIA_SUBDIR}/${GENICAM_LIB_SUBDIR}/bin/Linux64_ARM/lib*.so \
${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/libudev/bin/${TARGET}/lib/lib*.so.* \
${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/libusb-1.0.21/bin/${TARGET}/lib/lib*.so.* \
${sysconfdir}/profile.d/*.sh \
${sysconfdir}/ld.so.conf.d/*.conf \
${sysconfdir}/udev/rules.d/*.rules \
${sysconfdir}/sysctl.d/*.conf"
FILES_${PN}-dev += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so \
${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/*.cti \
${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/libudev/bin/${TARGET}/lib/lib*.so \
${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/libusb-1.0.21/bin/${TARGET}/lib/lib*.so"
FILES_${PN}-doc += "/usr/local/bin/*.sh \
${base_prefix}/${MVIA_SUBDIR}/${GENICAM_LIB_SUBDIR}/cache \
${base_prefix}/${MVIA_SUBDIR}/${GENICAM_LIB_SUBDIR}/log \
${base_prefix}/${MV_DATA_DIR}/genicam"
FILES_${PN}-dbg += "${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/libusb-1.0.21/bin/${TARGET}/lib/.debug"
Note
As a unique signature of a task's inputs, checksum indicates when the input data change. Therefore, you need to update the checksum of the license file if it has been changed. Run md5sum [file_name] to check the current MD5 checksum of the file and update it in your recipe.

After the recipe has been created, run bitbake to build it:

$ bitbake mvimpact-acquire-gentl

Install mvBlueFOX Specific mvIMPACT Acquire Libraries

Apart from the common mvIMPACT Acquire runtime libraries, you need to install the mvBlueFOX specific libraries from the mvBlueFOX installation archive in order to use mvBlueFOX devices. Therefore, download the mvBlueFOX-ARM64_gnu-2.44.0.tgz from the MATRIX VISION website (https://www.matrix-vision.com/treiber-software.html). Assume the target platform is arm64. Skip this step if the same *.tgz has been downloaded during the previous step Install Common mvIMPACT Acquire Libraries.

$ cp -r ~/Downloads/mvBlueFOX-ARM64_gnu-2.44.0.tgz recipes-mvimpactacquire/mvimpact-acquire/files/

Create a Bitbake recipe for installing mvBlueFOX specific mvIMPACT Acquire libraries:

$ touch recipes-mvimpactacquire/mvimpact-acquire/mvimpact-acquire-mvbluefox_2.44.0.bb

The demo Bitbake recipe mvimpact-acquire-mvbluefox_2.44.0 looks like this:

SUMMARY = "Installs mvBlueFOX specific mvIMPACT Acquire libraries"
DESCRIPTION = "This recipe installs mvIMPACT Acquire mvBlueFOX driver libraries for MATRIX VISION USB2 cameras."
HOMEPAGE = "http://www.matrix-vision.de"
LICENSE_FLAGS = "EULA"
LICENSE_FLAGS_WHITELIST = "EULA"
LICENSE = "EULA"
LIC_FILES_CHKSUM = "file://${WORKDIR}/mvIMPACT_Acquire-ARM64-2.44.0/doc/EULA.txt;md5=f6f99507036166a5604b38e6df10f004"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}"
SRC_URI = "file://mvBlueFOX-ARM64_gnu-2.44.0.tgz"
TARGET = "arm64"
MVIA_SUBDIR = "opt/mvIMPACT_Acquire"
MVIA_LIB_SUBDIR = "lib"
RDEPENDS_${PN} += " mvimpact-acquire-base"
do_install() {
# install mvIMPACT Acquire runtime binaries and dependencies.
install -m 0755 -d ${D}${base_prefix}
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvBlueFOX.so.${PV} ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libusb-1.0.so ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
# define udev rules for mvBlueFOX
install -m 0755 -d ${D}${sysconfdir}/udev/rules.d
install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/Scripts/51-mvbf.rules ${D}${sysconfdir}/udev/rules.d/
}
INHIBIT_PACKAGE_STRIP = "1"
INSANE_SKIP_${PN} += "dev-so \
already-stripped \
ldflags"
PACKAGES = "${PN}-dbg ${PN} ${PN}-dev"
FILES_${PN} += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so.* \
${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/libusb-1.0.so \
${sysconfdir}/udev/rules.d/*.rules"
FILES_${PN}-dev += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so"
FILES_${PN}-dbg += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/.debug"
Note
As a unique signature of a task's inputs, checksum indicates when the input data change. Therefore, you need to update the checksum of the license file if it has been changed. Run md5sum [file_name] to check the current MD5 checksum of the file and update it in your recipe.

After the recipe has been created, run bitbake to build it:

$ bitbake mvimpact-acquire-mvbluefox

Install mvVirtualDevice Specific mvIMPACT Acquire Libraries

Apart from the common mvIMPACT Acquire runtime libraries, you need to install the mvVirtualDevice specific libraries from either the mvGenTL or the mvBlueFOX installation archive in order to use mvVirtualDevice. In this example, the mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz will be downloaded and used. Assume the target platform is arm64. Skip this step if the same *.tgz has been downloaded during the previous step Install Common mvIMPACT Acquire Libraries or Install GenICam GenTL Specific mvIMPACT Acquire Libraries.

$ cp -r ~/Downloads/mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz recipes-mvimpactacquire/mvimpact-acquire/files/

Create a Bitbake recipe for installing mvVirtualDevice specific mvIMPACT Acquire libraries:

$ touch recipes-mvimpactacquire/mvimpact-acquire/mvimpact-acquire-virtualdevice_2.44.0.bb

The demo Bitbake recipe mvimpact-acquire-virtualdevice_2.44.0 looks like this:

SUMMARY = "Installs virtual device specific mvIMPACT Acquire libraries"
DESCRIPTION = "This recipe installs mvIMPACT Acquire driver libraries for virtual devices."
HOMEPAGE = "http://www.matrix-vision.de"
LICENSE_FLAGS = "EULA"
LICENSE_FLAGS_WHITELIST = "EULA"
LICENSE = "EULA"
LIC_FILES_CHKSUM = "file://${WORKDIR}/mvIMPACT_Acquire-ARM64-2.44.0/doc/EULA.txt;md5=f6f99507036166a5604b38e6df10f004"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}"
SRC_URI = "file://mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz"
TARGET = "arm64"
MVIA_SUBDIR = "opt/mvIMPACT_Acquire"
MVIA_LIB_SUBDIR = "lib"
RDEPENDS_${PN} += " mvimpactacquirebase"
do_install() {
# install mvIA runtime binaries and dependencies.
install -m 0755 -d ${D}${base_prefix}
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvVirtualDevice.so.${PV} ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
}
INHIBIT_PACKAGE_STRIP = "1"
INSANE_SKIP_${PN} += "dev-so \
already-stripped \
ldflags"
PACKAGES = "${PN} ${PN}-dev"
FILES_${PN} += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so.*"
FILES_${PN}-dev += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so"
Note
As a unique signature of a task's inputs, checksum indicates when the input data change. Therefore, you need to update the checksum of the license file if it has been changed. Run md5sum [file_name] to check the current MD5 checksum of the file and update it in your recipe.

After the recipe has been created, run bitbake to build it:

$ bitbake mvimpact-acquire-virtualdevice

Cross-Compile mvIMPACT Acquire Sample Programs

After the required mvIMPACT Acquire library packages have been successfully built, we can then use Bitbake to cross-compile programs with the mvIMPACT Acquire API. Since mvIMAPCT Acquire installation archieves already provide sample programs with CMake files and Bitbake supports CMake, we can use CMake to cross-compile these programs.

First, create a Bitbake recipe for cross-compiling the sample programs:

$ touch recipes-mvimpactacquire/mvimpact-acquire/mvimpact-acquire-examples_2.44.0.bb

In this demo recipe we will use mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz as the source file (you can also use mvBlueFOX-ARM64_gnu-2.44.0.tgz if needed). All source code is located under mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz/mvIMPACT_Acquire-ARM64-2.44.0/apps.

Here is how the demo recipe mvimpact-acquire-examples_2.44.0.bb looks like:

SUMMARY = "Builds and installs mvIMPACT Acquire sample programs"
DESCRIPTION = "This recipe builds and installs mvIMPACT Acquire sample programs."
HOMEPAGE = "http://www.matrix-vision.de"
LICENSE_FLAGS = "EULA"
LICENSE_FLAGS_WHITELIST = "EULA"
LICENSE = "EULA"
LIC_FILES_CHKSUM = "file://${WORKDIR}/mvIMPACT_Acquire-ARM64-2.44.0/doc/EULA.txt;md5=f6f99507036166a5604b38e6df10f004"
SRC_URI = "file://mvGenTL_Acquire-ARM64_gnu-2.44.0.tgz"
PACKAGE_ARCH = "${MACHINE_ARCH}"
S = "${WORKDIR}/mvIMPACT_Acquire-ARM64-${PV}/apps"
MVIA_SUBDIR = "opt/mvIMPACT_Acquire"
MVIA_APP_SUBDIR = "apps"
RDEPENDS_${PN} += " mvimpact-acquire-base"
export MVIMPACT_ACQUIRE_DIR="${WORKDIR}/mvIMPACT_Acquire-ARM64-${PV}/"
export LDFLAGS="${TARGET_LDFLAGS} \
-Wl,-rpath-link,${MVIMPACT_ACQUIRE_DIR}lib/arm64 \
-Wl,-rpath-link,${MVIMPACT_ACQUIRE_DIR}Toolkits/expat/bin/arm64/lib"
do_softlink() {
#!/bin/sh -e
cd ${MVIMPACT_ACQUIRE_DIR}Toolkits/expat/bin/arm64/lib
ln -sf libexpat.so.1.6.0 libexpat.so.1
ln -sf libexpat.so.1 libexpat.so
}
addtask softlink after do_fetch before do_configure
inherit pkgconfig cmake
do_install() {
install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_APP_SUBDIR}
install -m 0755 ${WORKDIR}/build/bin/* ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_APP_SUBDIR}
}
FILES_${PN} += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_APP_SUBDIR}/*"
Note
As a unique signature of a task's inputs, checksum indicates when the input data change. Therefore, you need to update the checksum of the license file if it has been changed. Run md5sum [file_name] to check the current MD5 checksum of the file and update it in your recipe.

After the recipe has been created, run bitbake to build it:

$ bitbake mvimpact-acquire-examples
Note
In order for the mvIMPACT Acquire CMake to be correctly configured, you may need to set the CMAKE_FIND_ROOT_PATH_MODE_INCLUDE variable to BOTH in the cmake.bbclass file.

Configure and Build the Image

Before building the custom Linux image with the mvIMPACT Acquire API, we need to install the successfully built mvIMPACT Acquire packages to the custom Linux image. In the following demonstration, all packages from above will be installed. You can also just install the ones that you need.

IMAGE_INSTALL_append = " mvimpactacquirebase"
IMAGE_INSTALL_append = " mvimpactacquirebase-dev"
IMAGE_INSTALL_append = " mvimpactacquirebase-doc"
IMAGE_INSTALL_append = " mvgentl"
IMAGE_INSTALL_append = " mvgentl-dev"
IMAGE_INSTALL_append = " mvgentl-doc"
IMAGE_INSTALL_append = " mvbluefox"
IMAGE_INSTALL_append = " mvbluefox-dev"
IMAGE_INSTALL_append = " mvimpact-acquire-virtualdevice"
IMAGE_INSTALL_append = " mvimpact-acquire-virtualdevice-dev"
IMAGE_INSTALL_append = " mvexamples"

After that, bitbake the image to build it for your target system.