opencpi — tools for developing and executing OpenCPI applications
Open Component Portability Infrastructure (OpenCPI) is an open source software (OSS) framework for developing and executing OpenCPI applications - connected and configured assemblies of components - on heterogeneous embedded systems. OpenCPI provides a set of tools to support the development and execution of OpenCPI applications. These tools include:
These tools are accessible from the bash UNIX/Linux shell, which
is the shell environment supported by OpenCPI.
To obtain general information about an individual tool, including command syntax, command options, and examples, see its manual page.
To obtain brief usage information for an individual tool,
use the --help (or -h) option; for example:
ocpirun --help
Options to OpenCPI tools are either single letters following one hyphen or hyphen-separated words or acronyms following two hyphens. Arguments to word-form options are preceded by an equal sign (=) or a space. Arguments to letter options are preceded by a space. For convenience, options can occur anywhere in command lines. Most options are specific to individual tools and are described in the manual pages for these tools. The options common to all tools are:
-d <directory>
-C option in the POSIX make command.
This option can be specified more than once on the command line.
-h, --help
-l <level>, --log-level=<level>
OCPI_LOG_LEVEL environment variable.
See ENVIRONMENT VARIABLES for a description of possible
values.
-v, --verbose
OpenCPI defines a variety of environment variables that can be used
to configure and control its operation. Some of these variables are set during
OpenCPI installation, some are set when the OpenCPI environment
is established with the OpenCPI setup script, most can be used during
OpenCPI development and some can be used when OpenCPI
applications are run. All of these variables are prefixed with OCPI_.
Nearly all of of these environment variables are optional, since not having
them set is always the default. OpenCPI environment variables
whose settings affect OpenCPI tools include:
OCPI_ROOT_DIR
opencpi-setup.sh) automatically sets this variable based
on the location of the setup script. If set manually
before the setup script is run (sourced), it will not be changed by that script.
OCPI_CDK_DIR
opencpi-setup.sh) is located and sourced from.
This environment variable should never be set directly.
It is usually the cdk subdirectory of the OpenCPI installation directory.
OCPI_LIBRARY_PATH
ocpidev run.
In pure runtime environments, it may need
to be set when artifacts are placed in directories of the user’s choice.
OCPI_LOG_LEVEL
stderr. The --log-level option to
the OpenCPI tools can be used to override the setting
of this variable.
OCPI_PROJECT_PATH
OCPI_PROJECT_REGISTRY_DIR
$OCPI_ROOT_DIR/project-registry) to a different,
alternative project registry. The directory specified in this
environment variable becomes the project registry with which
all subsequently created projects are associated.
OCPI_SYSTEM_CONFIG
$OCPI_ROOT_DIR/system.xml and creates a default system
configuration file at the path $OCPI_CDK_DIR/default-system.xml
(see CONFIGURATION). This environment variable can be used to override the
installation default, but this is rarely done.
To make an OpenCPI environment variable setting permanent for a given OpenCPI
installation, set it (with the bash shell export command) in the
OpenCPI user-specified environment variables script user-env.sh located
in the installation directory (see CONFIGURATION). The settings made in this
script are applied to the OpenCPI installation when the OpenCPI user setup script is run.
The OpenCPI Component Development Guide contains a master list of OpenCPI environment variables used during component development.
The files and scripts described below configure the OpenCPI development and/or runtime environments and thus affect the OpenCPI tools. The OpenCPI User Guide provides more information about them.
opencpi-setup.sh
The OpenCPI environment setup script. This script establishes
the OpenCPI environment when sourced with the following
bash shell command, which must be run before the tools
can be used:
source <location-of-opencpi>/cdk/opencpi-setup.sh -s
system.xml, default-system.xml
user_env.sh
$OCPI_ROOT_DIR). None
of the environment variables in this file are required
to be set. If any of these variables are set, the file
is sourced by the OpenCPI setup script when it is invoked
to set up the OpenCPI environment.
The OpenCPI documentation set is located at https://opencpi.gitlab.io.
The OpenCPI User Guide at that location provides a graphical roadmap that illustrates the suggested reading path through the OpenCPI documentation.