Fix assert_func warning/error

* Add while(1) to assert_func to avoid "function returns" warning
* Define a weak attr in mpconfig.h