Other Parts Discussed in Thread: C2000WARE
Tool/software:
I am working with the CM core and testing out my assert handling but even when I intentionally use bad parameters with a function call, I never see the __error__ function executed. Looking through the c2000ware source I noticed that assertions are only executed when the "DEBUG" symbol is defined so I double checked my linker settings to verify the include library paths and library search paths were pointing to the driverlib_cm.lib file in the Debug folder from the C2000ware install. After compilation was completed, I was able to verify in the .map file the correct .lib file was linked. To force an assert, I am executing:
IPC_initMessageQueue(IPC_CM_L_CPU1_R, NULL, 0, 0);
The null pointer in the second argument should trigger an assert according to the available source.
My error handler currently looks like tihs:
void __error__(const char *filename, uint32_t line) { __asm(" bkpt #0"); printf("%ul %s", line, filename); while(1); }
I never hit the breakpoint or get to the while loop. Is the "DEBUG" symbol not used when building the Debug precompiled library? Is that a mistake or is C2000ware not iintended to distributed like this?