The page will guide you through getting started with the Camera Reference Design. Source files are available on our downloads page. Binary releases are available for both Windows and Linux operating systems.

Camera Reference Design Developer’s Release

  • Pre-built okCameraApp and okSnapApp binaries
  • Pre-built CameraApp-JS web application
  • Pre-built bitfiles for camera and device pairings listed in Release Notes
  • okCameraApp C++ source code
  • okSnapApp C++ source code
  • CameraApp-JS source code
  • FPGA HDL source code for image capture processor for camera and device pairings listed in Release Notes
  • FreeMat sample source code
  • CPLD source code

Windows Platforms

Install wxWidgets 3.1.5 Files

Running the prebuilt okCameraApp binary and building the application from source both require use of the wxWidgets Release DLLs version 3.1.5. These are obtained from the wxWidgets 3.1.5 release Github, labeled wxMSW-3.1.5_vc14x_ReleaseDLL.7z (for 32-bit) or wxMSW-3.1.5_vc14x_x64_ReleaseDLL.7z (for 64-bit). You may place the Release DLLs within the directory of your okCameraApp binary or the directory containing the Release DLL’s can be added to the PATH environment variable.

If you are not building the okCameraApp binary, you can skip to ‘Running the Sample Application.’ Building okCameraApp requires wxWidgets files. The simplest solution is to download the prebuilt wxWidgets version 3.1.5 files from the wxWidgets 3.1.5 release Github. You will need:

  • Header Files
  • Development Files (32 or 64-bit)
  • Release DLLs (32 or 64-bit)

corresponding to your Visual Studio version and desired architecture. If you plan to build both 32 and 64 bits versions, you will need to download both versions of the development files and release DLLs. Unpack the downloaded files in any directory (however using spaces in the directory path is not recommended) and set the environment variable WXWIN to point to this directory, e.g.:

      set WXWIN = c:\wxWidgets-3.1.5

If desired, it is possible to build wxWidgets from source. Refer to its documentation for details.

Running the Sample Application

  1. Place the okFrontPanel.dll file from your FrontPanel installation in the same folder where the executables are located. To use the FPoIP features the okimpl_fpoip.dll file must be present in this directory as well.
  2. Place wxWidgets Release DLLs (see above) in this directory.
  3. Run the application.

Building the C++ Source

  1. Install wxWidgets (see above).
  2. Open Software\Camera.sln file in Visual Studio and build it. 
    1. Building in Release configuration is recommended for best performance.
    2. Building in Debug configuration is recommended for troubleshooting. See “Debug” section below.

Note

Camera.sln uses Visual Studio 2019 toolset by default, but should also be usable with both older and newer versions. See the Visual Studio documentation and communities for additional information.

Linux or macOS

Install wxWidgets

To build the C/C++ samples on Unix systems, you will need wxWidgets 3.x. Most Linux distributions include wxWidgets, so usually you should be able to just install it using your distribution package manager, I.e., for wxWidgets 3.0 in Ubuntu 20.04:

  1. sudo apt-get install libwxgtk3.0-gtk3-dev
  2. cd Software
  3. make

Otherwise, download wxWidgets sources from www.wxwidgets.org and build them according to the provided instructions, which basically just say to run configure followed by make.

If you build your own version of wxWidgets and do not run make install, you will need to provide the location to wx-config file for your custom build on make command line, e.g.:

     make WX_CONFIG=$HOME/wxWidgets/macbuild/wx-config

Otherwise, wx-config should already be in your PATH and you can simply run make.

Running the Sample Application

  1. Set LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (macOS) environment variable to include the directories containing FrontPanel and wxWidgets shared libraries. For the wxWidgets libraries, it’s only necessary to do this if you built them yourself and didn’t install them into one of the standard libraries directories.
  2. Run the application.

Building the C++ Source 

  1. Install wxWidgets (see above).
  2. Run the provided makefile. 
    1. DEBUG=1 on make command line is recommended for troubleshooting. See “Debug” section below.

Building the Gateware

All 7-Series and UltraScale devices provide a TCL script build method to generate the required IPs and import the required source files for the Vivado project mode work flow. These brief instructions presume you already have familiarity with the FrontPanel SDK and Vivado.

  1. Open Vivado GUI and use the TCL console to cd to the HDL folder for your target integration configuration:
    cd <Camera Reference Design Installation Directory>/HDL/XEM8320/SZG-Camera
  2. Run the provide TCL script. If the product is offered in multiple device densities then use the TCL script with the correct suffix that applies for your product:
    source project.tcl
  3. Import FrontPanel HDL for your product into the project. These sources are located within the FrontPanel SDK installation. Files are located at the following:
    <FrontPanel Installation Directory>/FrontPanelUSB/FrontPanelHDL/XEM8320-AU25P/Vivado-2021
  4. Generate Bitstream.

Debug

When building okCameraApp for debugging, the program needs to find the resource.xrc file during execution. If it is not found in the default location, okCAMERA_RESOURCES_DIR environment variable can be used to specify its directory, e.g.

    okCAMERA_RESOURCES_DIR=`pwd`/okCameraApp ./bin/okCameraApp

Note that in release/production builds, the resource file is embedded directly into the application executable (or application bundle under macOS) and this environment variable is not used.