Imported from deltaphi/RR32CanLibrary (
AGENTS.md). Install upstream withnpx skills add deltaphi/RR32CanLibrary. Copyright stays with the author.
Agent instructions
- This repository is the RR32Can embedded-oriented C++14 library; production code is under
lib/, tests undertest/, and the UDP desktop example underexamples/udp_station/. - The CMake project is a development/test harness, not the library's embedded build system. Keep builds out of the source tree (
build/is ignored because in-tree builds interfere with PlatformIO). - Configure and build the normal Linux harness from the repository root with
cmake --preset Linuxfollowed bycmake --build --preset build-Linux; CMake downloads GoogleTest v1.18.0 during configuration, so configure requires network access. - Run tests with
ctest --test-dir build --output-on-failureor./build/RR32CanTest; focused GoogleTest cases can use./build/RR32CanTest --gtest_filter='SuiteName.TestName'. - The test target is a single executable assembled explicitly in the root
CMakeLists.txt; adding a new test file requires adding it to that target. - The UDP example is a separate target:
cmake --build build --target rr32can_udp_station, then./build/examples/udp_station/rr32can_udp_station. It sends UDP to the host configured inexamples/udp_station/UdpStationConfig.hon port15731and receives broadcasts on port15730; editexamples/udp_station/main.cppto change experiments. - Library consumers must copy
lib/RR32Can/_RR32Can_config.hto their project asRR32Can_config.hand customize it; the test and example directories provide their own configs. - C++ formatting is governed by
.clang-format(120-column limit).apply-clang.shassumes Windows LLVM paths andclang-format.exe, so format changed files directly when working on other platforms. - Use C++14 with extensions disabled; non-MSVC CMake builds enable
-Wall -Wextra -pedantic.
