This repository has the source code for a simple, generic DSAT based device plugin. This device
is capable of performing DSAT-based reads and writes, using an array allocated at runtime to hold the register values. It can be
registered to BUTool at runtime via it's device library, and supports the
read, write and status commands from BUTool CLI.
Some address tables are defined under the directory test/address_tables. Check out DSAT for
more examples of address tables in DSAT-format.
Note: Since this plugin has dependencies to BUTool, these instructions assume that BUTool is built and installed under the path BUTOOL_PATH.
For building the project, the following steps must be taken:
- Clone the repository recursively, together with the
DSATsub-module - Build the
DSATsubmodule - Source the
env.shscript with the correctBUTOOL_PATHand make the DSAT-device plugin
The following commands illustrate the process:
# Note: If you don't have SSH keys set up, you might want to use a different GitHub Auth
git clone --recursive git@github.com:alpakpinar/GenericDSATDevice_plugin.git
# Build the DSAT sub-module
cd dsat/
make
# Build the plugin
cd ../
source env.sh /path/to/BUTool/install
makeTo remove all build products, you can execute make clean.
Once the plugin is built using the instructions from the last sub-section, you should have the libDSAT_GenericDSATDevice.so library under the directory lib. This shared library file will be used to register the GenericDSATDevice to BUTool.
The following commands illustrate this process:
cd /path/to/BUTool
# Set LD_LIBRARY_PATH correctly
source env.sh
# Start BUTool and add the DSATDevice library
/path/to/BUTool.exe -l /path/to/libDSAT_GenericDSATDevice.so
Registered device: GENERICDSAT
> add_device GENERICDSAT /path/to/address_table.adtAnd you're done! You can do reads and writes, or display status tables via status command in the BUTool CLI.