This repository contains the control logic for chargebyte GmbH's Linux-based hardware products, implemented as modules within EVerest.
This repository includes the following modules:
- CbChargeSOMDriver: Hardware abstraction layer for chargebyte's Charge SOM.
- CbTarragonDriver: Hardware abstraction layer for chargebyte's Tarragon board.
- CbTarragonPlugLock: Driver for plug lock control on chargebyte's Tarragon board.
- CbTarragonDIs: Driver for configuring digital input reference PWM on chargebyte's Tarragon board.
- CbSystem: Implements system wide operations for chargebyte's hardware products.
- InfypowerDCSupply: Driver for Infypower's BEC/BEG power modules.
| Tag | EVerest release |
|---|---|
| 0.24.0 | 2025.1.0 or newer1 |
| 0.23.0 | 2025.1.0 or newer1 |
| 0.22.2 | 2025.1.0 or newer1 |
| 0.22.1 | 2025.1.0 or newer1 |
| 0.22.0 | 2025.1.0 or newer1 |
| 0.21.0 | 2024.9.0 2025.1.0 |
| 0.20.0 | 2024.9.0 2025.1.0 |
| 0.19.0 | 2024.9.0 2025.1.0 |
| 0.18.0 | 2024.9.0 2025.1.0 |
| 0.17.0 | 2024.9.0 2025.1.0 |
| 0.16.0 | 2024.8.0 |
| 0.15.0 | 2024.8.0 |
| 0.14.0 | 2024.7.1 2024.7.0 |
| 0.13.0 | 2024.7.1 2024.7.0 |
| 0.12.0 | 2024.6.0 2024.5.0 |
| 0.11.0 | 2024.6.0 2024.5.0 |
| 0.10.0 | 2024.6.0 2024.5.0 |
| 0.9.0 | 2024.3.0 |
To build and use these modules in EVerest, check out this repository in the same directory as everest-core, i.e., your EVerest workspace.
├── everest-core
└── everest-chargebyte
└── ....Make sure to follow the instructions written everest-core.
Some modules depend on libgpiod. However, this cannot be installed on Ubuntu with a package manager because the modules depend on a newer version of libgpiod which Ubuntu does not provide (2.0.1). Therefore, the libgpiod should be installed manually.
sudo apt-get update
sudo apt-get install autoconf-archive
git clone git://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
cd libgpiod/
git checkout v2.0.1
./autogen.sh --enable-bindings-cxx
sudo make installSome other modules depend on sigslot. This is a header-only C++ library which is not packaged in Ubuntu. It must be installed manually, for example with the following steps:
git clone https://github.com/palacaze/sigslot.git
cd sigslot
git checkout v1.2.1
mkdir build
cd build
cmake -DSIGSLOT_COMPILE_EXAMPLES=OFF -DSIGSLOT_COMPILE_TESTS=OFF ..
sudo make installSome modules depend on libsocketcan. The library is included as package in Ubuntu and also available in Yocto (both version 0.0.12). In case manual installation is needed, use for example the following steps:
git clone https://github.com/linux-can/libsocketcan.git
cd libsocketcan
git checkout v0.0.12
./autogen.sh
mkdir build
cd build
../configure
sudo make installThe module CbChargeSOMDriver depends on the library ra-utils. It must be installed manually, for example with the following steps:
git clone https://github.com/chargebyte/ra-utils.git
cd ra-utils
mkdir build
cd build
cmake ..
sudo make installThe module CbSystem depends on libsystemd. The library is included as a package in Ubuntu and also available in Yocto.
sudo apt install libsystemd-devRemember that, when cross-compiling for the target platforms, all libraries must be included in your SYSROOT environment.
If you need to regenerate the modules using the EVerest ev-cli tool, for example, if there is a change in the EVerest interfaces, execute the following command:
cd everest-chargebyte
ev-cli mod update <your_module_name> --everest-dir . ../everest-coreNote the two arguments given as everest-dir. This is because the modules depend on types in the everest-chargebyte repository, along with the known dependency on everest-core.
Finally, to build the modules, execute the following commands:
mkdir build # inside everest-chargebyte
cd build
cmake ..
make install -j$(nproc)First of all you need to install GTest
sudo apt update
sudo apt install libgtest-dev
You might run into some problems regarding running/compiling the tests. A quick fix is as follows
sudo apt install libgpiod-dev libgpiod2
To run the tests, you need to run cmake and turn on the option of compiling tests
mkdir build # inside everest-chargebyte
cd build
cmake -DBUILD_CB_TESTING=1 ..
make -j$(nproc)
Under the 'build' directory, change the directory to the path where the tests are compiled and use CTest
cd tests/modules/CbTarragonDriver
ctest -N # To know how many tests are captured
ctest -rerun-failed --output-on-failure # to run the tests and re-run the failed cases verbosely