libcanard exposes a configurable assertion macro: CANARD_ASSERT(x) (defaulting to assert(x)), which can be redefined via -DCANARD_CONFIG_HEADER="..." without touching library source.
The cy core library, cy_can.c, and platform backends like cy_can_socketcan.c do not follow this pattern and call the plain standard assert() directly, with no CY_ASSERT (or similar) indirection macro and no config-header hook.
On embedded/baremetal targets, applications frequently need custom assertion handling (e.g., trigger a fault handler, blink an LED, log via a specific channel) and this makes it impossible to use the library without modifying its source code, which is undesirable.
libcanard exposes a configurable assertion macro:
CANARD_ASSERT(x)(defaulting toassert(x)), which can be redefined via-DCANARD_CONFIG_HEADER="..."without touching library source.The cy core library,
cy_can.c, and platform backends likecy_can_socketcan.cdo not follow this pattern and call the plain standardassert()directly, with noCY_ASSERT(or similar) indirection macro and no config-header hook.On embedded/baremetal targets, applications frequently need custom assertion handling (e.g., trigger a fault handler, blink an LED, log via a specific channel) and this makes it impossible to use the library without modifying its source code, which is undesirable.