Contributing

We welcome contributions to the project! This document outlines the process for contributing code, reporting issues, and suggesting improvements.

Setting Up Your Development Environment

We work with VS Code [1] or Cursor [2]. The recommended setup is a Dev Container: the cross compiler, sysroot, compile_commands.json, clang-tidy, and gdb are all available inside the container with correct paths for the IDE.

Dev Container setup

  1. Install the Dev Containers extension.

  2. Open the repository and run Dev Containers: Reopen in Container.

  3. Choose akr2daq3 (armv7 / ZC706) or akr2daq3 (aarch64 / ZCU102).

  4. On first start the container copies the matching example config to config/config.cmake and runs an initial CMake configure.

  5. Build with ./compile_debug_armv7 (or the default build task).

The Dev Container mounts your host ~/.ssh for deploy and uses host networking so the board is reachable by hostname (e.g. zc706.local or zcu102.local).

IDE settings (clang-tidy, compile_commands.json, clangd) are configured in .devcontainer/devcontainer.json. The checked-in .vscode/ files provide build tasks and a debug launch configuration for attaching to gdbserver on the board — see Debug.

Manual VS Code setup (without Dev Container)

If you build on the host (native toolchain or one-shot Docker compile scripts), add the following to .vscode/settings.json:

{
   "C_Cpp.codeAnalysis.clangTidy.enabled": true,
   "C_Cpp.codeAnalysis.clangTidy.useBuildPath": true,
   "C_Cpp.clang_format_fallbackStyle": "Google",
   "C_Cpp.codeAnalysis.exclude": {
      "**/extern/**": true,
      "**/build/**": true,
      "**/build-armv7/**": true,
      "**/build-aarch64/**": true
   },
   "[cpp]": {
      "editor.tabSize": 2
   },
   "search.exclude": {
      "**/.git": true,
      "**/extern": true,
      "**/doxyxml": true,
      "**/build/**": true,
      "**/build-armv7/**": true,
      "**/build-aarch64/**": true,
      "**/html": true
   }
}

Point compileCommands in .vscode/c_cpp_properties.json at the build directory that contains compile_commands.json.

Reporting Issues

If you encounter any issues while using the project, please report them on the project’s issue tracker. Provide as much detail as possible, including steps to reproduce the issue, the expected behavior, and any relevant logs or screenshots.

Submitting Code

To submit code to the project, follow these steps:

  1. Fork the repository:

    Create a fork of the repository on GitLab.

  2. Create a new branch:

    git checkout -b my-feature-branch
    
  3. Make your changes:

    Ensure your code follows the project’s coding standards and includes appropriate tests.

  4. Commit your changes:

    git commit -m "Description of my changes"
    
  5. Push your changes:

    git push origin my-feature-branch
    
  6. Create a merge request:

    Open a merge request on GitLab and provide a detailed description of your changes.

Code Style

Please follow the project’s coding standards when contributing code. This includes using clang-format with the Google style defined in the .clang-format file and ensuring all code is properly documented.

Testing

Ensure that all tests pass before submitting your code. You can run the tests using the following command from within the doc directory:

python -m unittest discover

For further information on running tests, see the Tests section.

Thank you for contributing to the project!

Bibliography