C Microkernel Realtime eXecutive
Realtime Operating System for Cortex-M based microcontrollers
 
Loading...
Searching...
No Matches
Assertions

CMRX SDK provides assertiong mechanism.

CMRX SDK provides assertiong mechanism.

This is fairly typical and very lean assertion wrapper. Assertion evaluates condition. If it evaluates to false, then debugger trap is signalized. This mechanism is available both in userspace and kernel space and generally has no limitation on when and how can be used. Just mind the fact, that condition should generally be a constant expression, otherwise code may behave differently, if assertions are turned off.

Assertions are only built if NDEBUG macro is not defined.