-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
SITSW-7853
-
-
11.02.00
-
Since DebugP_assert is not optimized out of production code, it should not have the ability to crash the entire processor core when an error is caught.
A longer term design overhaul might include things like making DebugP_assert conditional on the make profile (debug, production, etc), and replacing DebugP_assert in most locations with a formal error handling framework. However, for now, let's remove the line that disables hardware interrupts, and add a sleep inside the loop. That way the thread with the error crashes, but the rest of the threads are able to keep running (avoiding behavior like the DM R5F crash on AM62x/AM62Ax/AM62Dx/AM62Px/AM67/AM67A)
like this:
void _DebugP_assert(int32_t expression, const char *file, const char *function, int32_t line, const char *expressionString) { if(expression == 0) { ... /* remove this line */ /* (void) HwiP_disable(); */ while(assert_loop != 0U) { /* TODO: add sleep here */ /* loop forever */ } }