I reopen the thread because I have a question related to that topic.
I'm using the IMXRT1050 board and I saw the assertion failed declaration in assert.h file of the redlib library. Here below the code:
void __assertion_failed(char *_Expr) __attribute__ ((noreturn));
/*
* It is legal to reset NDEBUG and re-include <assert.h> hence the
* fact that this bit gets done every time it is included. This
* implementation follows the Rationale to the C99 standard.
*/
#ifdef NDEBUG
# define assert(ignore) ((void)0)
#else
#define _ASSERT_STR(x) _ASSERT_VAL(x)
#define _ASSERT_VAL(x) #x
#define assert(expr) \
((expr) ? (void)0 : \
__assertion_failed(__FILE__ ":" _ASSERT_STR(__LINE__) " : " #expr))
However there is definition of __assertion_failed function nowhere. Does a developer define it or the SDK provide it if some symbol is defined?
Thank you,
Massimiliano