ocpixml — command-line tool for managing artifact description XML in OpenCPI artifact files and standalone XML files
The ocpixml(1) command-line tool is used to manage the artifact
description XML that exists inside an OpenCPI artifact
file generated by the ocpidev(1) build operation.
It can also be used to parse any standalone XML file.
The artifact description XML describes the contents of
an executable binary (an artifact resulting from building
an RCC or HDL worker or a component unit test)
or a "bitstream" executable (an artifact resulting from
building an HDL assembly)
and is attached during the build process to the generated
executable or bitstream (.bitz or .gz) artifact file.
The ocpixml tool can be used to manipulate
the artifact description XML attached to an artifact file.
For convenience, options can occur anywhere in the command.
When invoked without options and verbs, ocpixml displays help information.
The verbs supported by ocpixml are:
add
stdin (indicated with a hyphen) to
the named artifact file, in place.
get
stdout.
parse
stdout.
strip
In addition to the general-purpose options common
to all OpenCPI tools (see opencpi(1)),
the options described below can be specified for ocpixml operations.
In the following descriptions, a plus sign (+) after the option indicates
that it can be specified more than once on the command line.
Arguments to word-form options are preceded by an equal sign (=)
(as shown in the following descriptions) or a space. Arguments to
letter options are preceded by a space.
-s, --silent
-a <attribute-name>, --attribute=<attribute-name>+
-t <top-element-name>, --top=<top-element-name>+
Add the content of the XML file named MyFile.xml to
the artifact file named myartifact1.bitz and only output exit status:
ocpixml -s add myartifact1.bitz MyFile.xml
Add standard input to the artifact file named myartifact1.gz:
ocpixml add myartifact1.gz -
Extract the XML metadata from the artifact file named myartifact1.bitz
and write it to stdout:
ocpixml get myartifact1.bitz
Parse the top-level element1 and the attributes attr1 and attr2
from the XML file named MyFile.xml and write them to stdout.
Generate an error if element1 and attr1 are not present.
Generate a blank line if attr2 is not present.
ocpixml -t element1 -a attr1 -a ?attr2 parse MyFile.xml
Remove the XML metadata from the artifact file named myartifact1.gz
and copy the results to the artifact file named mynewartifact1.gz:
ocpixml strip myartifact1.gz mynewartifact1.gz
See the main web site: https://www.opencpi.org
See the OpenCPI Component Development Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_Component_Development_Guide.pdf
See the OpenCPI HDL Development Guide: https://opencpi.gitlab.io/releases/latest/docs/OpenCPI_HDL_Development_Guide.pdf