(Written by ChatGPT, reviewed by developer)
PCIe_XDMA_Lib is a C++ library for interacting with PCIe DMA devices. This repository includes both a static library and an executable for reading from and writing to PCIe DMA devices.
source/: Contains the source code for the library and executable.include/: Header files for the library.lib/: Directory where the static library will be installed.bin/: Directory where the executable will be installed.build/: Directory where the build files and temporary files are placed.
- CMake (version 3.10 or higher)
- A C++ compiler (e.g., g++, clang++)
-
Clone the Repository
git clone https://github.com/jaca230/PCIe_XDMA_Lib.git cd PCIe_XDMA_Lib -
Run the Build Script
By default, the build script will create the necessary directories, build the project, and place the output files in the
build,lib, andbindirectories../build.sh
Options:
--overwrite: Overwrite existingbuild,lib, andbindirectories.--install: Runmake installafter building. You can specify an install prefix by setting theCMAKE_INSTALL_PREFIXenvironment variable, e.g.,CMAKE_INSTALL_PREFIX=/your/custom/path.
Example with overwrite and custom install path:
./build.sh --overwrite --install
-
Building without the Script
If you prefer to use CMake and Make manually:
mkdir -p build cd build cmake .. makeTo install the files:
make install
By default, files will be installed to
/usr/local/binfor executable,/usr/local/libfor libraries. and/usr/local/include/for headers. You can change this by setting theCMAKE_INSTALL_PREFIXvariable:cmake -DCMAKE_INSTALL_PREFIX=/your/custom/path .. make make install
After building and installing, you can link against the libxdma_device.a library and use the PCIe_DMA_Readout executable as needed.
This project is licensed under the MIT License - see the LICENSE file for details.