AVR-8 handle assertions in user code


AVR-8 doesn't have a hardware/interrupt mechanism to support assertion. Well, you can skip the assertions if you safely can because all the assert() are replaced with ((void)0), but if you want to do something about it then,

1. Define the _ASSERT_USE_STDERR symbol.

1. Make sure the assert funcion is called without parameters, Like assert(NULL).

1. Write a function with the following signature

extern void _assert(const char *_func, const char *_file, 
int _lineno, const char *_sexp) 

//Do what you want to do, may be 

Reference : http://www.nongnu.org/avr-libc/user-manual/group__avr__assert.html