Homepage GitHub

Libcanard v2.0 released

The new version brings several major improvements:

  • Dedicated transmission queues per redundant CAN interface with depth limits. The application is now expected to instantiate CanardTxQueue (or several in case of redundant transport) manually.

  • Replace O(n) linked lists with fast O(log n) AVL trees (Cavl library is distributed with libcanard). Traversing the list of RX subscriptions now requires recursive traversal of the tree.

  • Manual DSDL serialization helpers removed (canard_dsdl.h / canard_dsdl.c); use Nunavut instead.

  • Replace bitwise CRC computation with a much faster static table by default (#185). This can be disabled by setting CANARD_CRC_TABLE=0, which is expected to save ca. 500 bytes of ROM.

  • Fixed issues with const-correctness in the API (#175).

  • canardRxAccept2() renamed to canardRxAccept().

  • Support build configuration headers via CANARD_CONFIG_HEADER.

  • Add API for generating CAN hardware acceptance filter configurations (#169).


Usage examples adapted for the updated API are available in the README.

Special thanks to @coder_kalyan for critical contributions to this release.

2 Likes

Additionally, a Docker container packaging the build toolchain is now available:

cd docker/ && docker build -t libcanard . && cd ..

After the container is built and tagged, use ./docker/run-docker.sh followed by the toolchain command to run. For example:
mkdir build && ./docker/run-docker.sh cmake -B build tests/

In the (hopefully near) future, the libcanard image will be published to dockerhub.

1 Like

it is great to see a new version coming out! Is there a plan to release some minima examples?

Minimal usage examples are already available in the README. That’s all we have right now but that should be sufficient to get started.

1 Like

Many thanks!