This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28384D: C2000ware Asserts in precompiled library

Part Number: TMS320F28384D
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?

  • Hi, 

    I looked through the projectspecs and found that the "--define=DEBUG" option is missing for the driverlib_cm project.  Will report this as a bug. 

    To get around this for now, you can import the driverlib_cm project from  (<C2000WareInstall>\driverlib\f2838x\driverlib_cm), update  the project properties to add the "DEBUG" symbol in the predefined symbols and recompile it. 

    You will have to recompile your project using this library

    Best Regards

    Siddharth