Environment Variables used in Component Development

All OpenCPI environment variables start with the prefix OCPI_. While some defined variables apply only to certain authoring models or targets, a master list is kept here. Some may be described as documented elsewhere.

There also may be environment variables starting with OCPI_ that are used internal to OpenCPI and not documented for users.

In the table below, environment variables that are boolean options have the value 0 or 1. When they are unset, or set to the empty string, it is equivalent to the value 0.

In the table below a list means a white-space-separated list of items. A path means a colon-separated list of directories. All these variables have commonly used defaults so that most users have very few settings.

Most of the items are set at installation time, several are simply convenience variables derived from others. The ones that a developer might actually set during development are shaded.

Name

When

set?

Data

type

Description

OCPI_ALTERA_DIR

install

directory

Top level directory for all Altera tools. Default: ~/altera or /tools/Altera

OCPI_ALTERA_VERSION

install

directory

Directory under OCPI_ALTERA_DIR for current/desired Altera tools version. Default is highest numeric version present under $OCPI_ALTERA_DIR

OCPI_ALTERA_TOOLS_DIR

install

directory

Directory for using Altera tools. Default: $OCPI_ALTERA_DIR/$OCPI_ALTERA_VERSION

OCPI_ALTERA_LICENSE_FILE

install

file

Altera license file. Default: $OCPI_ALTERA_DIR/Altera-License.lic

OCPI_ALTERA_KITS_DIR

install

directory

Directory for Altera development kits. Default is $OCPI_ALTERA_TOOLS_DIR/kits

OCPI_ASSERT

build

boolean

Enable assertions in any language (when != 1, for C and C++, sets NDEBUG). Default: 1

OCPI_CDK_DIR

install

directory

The root of the installed CDK. Default: $OCPI_ROOT_DIR/cdk

OCPI_CFLAGS

build

list

Flags when compiling C code. Default set per target, but may be overridden.

OCPI_CXXFLAGS

build

list

Flags when compiling C++ code. Default set per target, but may be overridden.

OCPI_DEBUG

build

boolean

Controls debug logging, etc. For C and C++, enables “-g” also, or if not set, -O2. Is defined as a preprocessor macro for core software or executables. Default: 1

OCPI_DYNAMIC

build

boolean

For main programs and software libraries: use dynamic linking and dynamic libraries. For software components, build for use in dynamic executables. Currently only 0 is supported.

OCPI_LIBRARY_PATH

run

path

Runtime search path for binary artifacts. Default: for applications in projects: current and depended-on project artifacts Default: for unit tests: a unit test’s own generated artifacts and the core project’s artifacts

OCPI_PREREQUISITES_DIR

install

directory

Location for using prerequisites, default locations for building and installing prerequisites. Default: $OCPI_ROOT_DIR/prerequisites

OCPI_PROJECT_REGISTRY_DIR

build

directory

Location of current project registry, overriding the default in the OpenCPI installation.

OCPI_SMB_SIZE

run

number

To override size in bytes of data plane endpoints. Default: 100000000.

OCPI_TOOL_PLATFORM

build

string

The platform on which the current environment is executing. Automatically determined by the platforms/getPlatforms.sh script.

OCPI_TARGET_PLATFORM

build

String

The default target software platform to build for.

OCPI_XILINX_DIR

install

directory

Top level directory for all Xilinx tools. Default is from Xilinx: /tools/Xilinx

OCPI_XILINX_VERSION

install

directory

Directory under OCPI_XILINX_DIR` for current/desired Xilinx tools version. Default is highest numeric version present under $OCPI_XILINX_DIR.

OCPI_XILINX_TOOLS_DIR

install

directory

Directory for using Xilinx tools. Default: $OCPI_XILINX_DIR/$OCPI_XILINX_VERSION

OCPI_XILINX_LICENSE_FILE

install

file

Xilinx tool license file. Default is: $OCPI_XILINX_DIR/License.lic

OCPI_XILINX_LABTOOLS_DIR

Install

directory

Where a Xilinx Lab Tools installation is, default is $OCPI_XILINX_TOOLS_DIR.