An ApolloSM-specific plugin using the HERD Library.
Derived from the work of the CMS Phase-2 Tracker Online SW group, whose work can be found here.
This repository contains an ApolloSM_device-specific plugin with an ApolloDevice
class that utilizes the EvaluateCommand functionality from BUTool to wrap several ApolloSM_device commands, including:
cmpwrdown
,cmpwrup
,read
,svfplayer
anddev_cmd
, which allows for the execution of any ApolloSM_device command by passing the command string and the appropriate arguments.
The main dependency is swatch
, which in turn requires:
And, in the switch from ZMQ & msgpack to HTTP & JSON, the HERD control app now requires
- jsoncpp-devel for communication.
-
ssh into the SoC
-
Install the HERD control app and library, along with their dependencies, following the instructions in the README:
- Install the dependencies:
yum install gcc-c++ make cmake3 boost-devel log4cplus-devel yaml-cpp-devel jsoncpp-devel gtest-devel
- Ensure
swatch
checked out, or rungit submodule update --init
- NOTE: due to the old compiler on the Apollo failing with certain aspects of the build (namely the test suite, which is not necessary for this), certain aspects of the build process for
swatch
and the control app must be changed: - Build HERD library and control application with
mkdir build && cd build cmake3 .. make
- Finally, if you want to install the HERD library and control application, run
sudo make install
- Install the dependencies:
-
Checkout the ApolloHerd plugin and build by running:
mkdir build && cd build
cmake3 ..
make
If built directly on SoC:
After installing the HERD control app and swatch
(see above) and building ApolloHerd, run:
source env.sh
herd-control-app Apollo.yml
NOTE: if ERROR: locale::facet::_S_create_c_locale name not valid
error, then prepend command with LC_ALL=C
(until workaround found)
source env.sh
LC_ALL=C herd-control-app Apollo.yml
Eventually, the goal is to run this software in a container on the Apollo. In the Docker/
directory there are several scripts designed to be run inside of a container. The main script (almost working) is build.sh
and installs all of the software necessary to run the HERD control app and the Apollo plugin for HERD. The code is all compiled inside of the container:
gitlab-registry.cern.ch/cms-tracker-phase2-onlinesw/herd-docker/herd-base-dev:master-8cd483a1
If building in a container: (WIP) To build the image targeting armv7 on x86 architecture:
- Navigate to directory containing Dockerfile
- Run
docker buildx build --platform linux/arm -t ammitra/apolloherd . --push
- login to the docker hub and substitute your own username as necessary This should build and push the armv7 image to the desired registry.
Useful links regarding buildx
: