Getting Started
The page will guide you through getting started with the Camera Reference Design.
Resources
- Source files are available on GitHub at Camera.
- Pre-built binaries are attached as GitHub releases and can be found at GitHub Releases.
Windows Platforms
Running the Pre-built Application
- Install FrontPanel SDK
- Obtain the following from wxWidgets 3.2.0 release Github:
wxMSW-3.2.0_vc14x_ReleaseDLL.7z
(For x32)wxMSW-3.2.0_vc14x_x64_ReleaseDLL.7z
(For x64)
- Unzip to a common location, i.e.
C:\wxWidgets-3.2.0
- Add paths to
PATH
environment variable:C:\wxWidgets-3.2.0\lib\vc14x_x64_dll
(For x64)C:\Program Files\Opal Kelly\FrontPanelUSB\API\lib\x64
(For x64. Use location of your FrontPanel SDK install directory)C:\wxWidgets-3.2.0\lib\vc14x_dll
(For x32)C:\Program Files\Opal Kelly\FrontPanelUSB\API\lib\Win32
(For x32. Use location of your FrontPanel SDK install directory)
- Prepare the bitfiles:
- Download all the pre-built bitfiles included in the Camera-ExampleDesign-vX.Y GitHub Releases.
- Create a
Bitfiles
directory at the same directory level asindex.html
. - Place all the downloaded bitfiles into this
Bitfiles
directory. The application will look for the FPGA bitfiles in this directory.
- Run the application.
Building the C++ Source
- Install FrontPanel SDK
- Obtain the following from wxWidgets 3.2.0 release Github:
wxWidgets-3.2.0-headers.7z
wxMSW-3.2.0_vc14x_Dev.7z
(For x32)wxMSW-3.2.0_vc14x_x64_Dev.7z
(For x64)
- Unzip to a common location, i.e.
c:\wxWidgets-3.2.0
- Set
WXWIN
environment variable toc:\wxWidgets-3.2.0
- set
okFP_SDK
environment variable to the location of the SDK’sAPI
folder, i.e.C:\Program Files\Opal Kelly\FrontPanelUSB\API
- Open
Software\Camera.sln
file in Visual Studio and build it.- Building in
Release
configuration is recommended for best performance. - Building in
Debug
configuration is recommended for troubleshooting. See “Debug” section below.
- Building in
Linux Platforms
Install wxWidgets
The latest camera example design includes pre-built applications that were built using Ubuntu 20.04 and wxWidgets 3.2. To install wxWidgets 3.2, execute the following sequence of commands:
sudo apt install ca-certificates
sudo apt-key adv --fetch-keys https://repos.codelite.org/CodeLite.asc
sudo apt-add-repository 'deb https://repos.codelite.org/wx3.2.0/ubuntu/ focal universe'
sudo apt update
sudo apt install libudev-dev libwxgtk3.2unofficial-dev
Running the Pre-built Application (Ubuntu 20.04)
- Install wxWidgets (see above)
- Install FrontPanel SDK
- Prepare the bitfiles:
- Download all the pre-built bitfiles included in the Camera-ExampleDesign-vX.Y GitHub Releases.
- Create a
Bitfiles
directory at the same directory level asindex.html
. - Place all the downloaded bitfiles into this
Bitfiles
directory. The application will look for the FPGA bitfiles in this directory.
- Run the application.
Building the C++ Source
- Install wxWidgets (see above).
- Install FrontPanel SDK
- Run the provided makefile.
cd Software
make
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.
- Open Vivado GUI and use the TCL console to
cd
to theHDL
folder for your target integration configuration:cd <Camera Reference Design Installation Directory>/HDL/XEM8320/SZG-Camera
- 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
- 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
- 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.
Platform Application (Beta)
Running the Pre-built FrontPanel App
Requirements
- FrontPanel v6.0.0 (beta) or later
Camera-ExampleDesign-vX.Y.asar
from the latest Camera-ExampleDesign-vX.Y GitHub release.
Steps
- Open the FrontPanel Platform application.
- In the now open file browser, select the
Camera-ExampleDesign-vX.Y.asar
file you downloaded from the latest Camera-ExampleDesign-vX.Y release
Building the FrontPanel App
Requirements
- Latest Camera-ExampleDesign-vX.Y release Source Code (zip or tar.gz)
szg-camera-xem8320.bit
from theCamera-ExampleDesign-vX.Y-Bitfiles.zip
bundle located in the latest Camera-ExampleDesign-vX.Y release- Install prerequisites from the Development Guide
- FrontPanel 6.0.0 installed
Steps
- Open Folder: Open the
ExampleProjects/Camera/Software/FP-Platform
folder in Visual Studio Code. This file is located in the Camera-ExampleDesign-vX.Y release Source Code. - Add Prebuilt Bitfile: Copy the
szg-camera-xem8320.bit
to theassets
folder. - Install Dependencies: Run
npm install
within a Visual Studio command terminal. - Build Project: Run
npm run pack
within a Visual Studio command terminal. - Locate Output: The
app.asar
file is located in theoutput
folder. - Run Application: Open the FrontPanel Platform beta Application and select the
app.asar
file you built in the previous step.