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.

TMS320F280039C: CLA task is stuck during run-time debug

Part Number: TMS320F280039C

Tool/software:

Hi Champ,

I am asking for my customer.

We are able to get into clatask1 and stop at the __mdebugstop();  but it could ONLY stop at there ONCE. Then, it is stuck in debug mode.

The clatask1 is triggered by ADCAINT1, and continuously triggering, so that clatask1 should be triggered again and again repeatedly.

pseudo code shown below.

__interrupt void ClaTask1()

{
  __mdebugstop();

  func1 ;  // function defined in .cla1

  func2 ;  // function defined in .c 

}

From my understanding, CLA task should never call the functions from .c file unless the function is thru inline declared in the .h file or declared in the .cla file.

I am suspecting the root cause is clatask1 can only stop at the breakpoint once due to following executing to func2, then the CLA PC is pointing to somewhere else, then stuck and never executing the next time clatask1.

Does the expert have thought on this ?

Thanks and regards,

Johnny

  • Hi Johnny,

    If you have a __mdebugstop() line in your task, the CLA will stop there and stay stopped until you resume code execution from the CLA context in the debugger. Is this what you are asking about? Or are you saying that even after you resume execution, you never see the debugger stopping at __mdebugstop() again?

    To debug possible issues with the func2, can you try stepping into this function in the debugger and viewing the disassembly?

    From my understanding, CLA task should never call the functions from .c file unless the function is thru inline declared in the .h file or declared in the .cla file.

    This is true unless you use the --cla_default option, which is a little more complicated. You would need to separate the function into its own C file to be compiled for the CLA, see the thread linked here for more details. If you want to have the same file defining the same functions for both the CLA and CPU, a header file with inline functions is the correct approach.

    Best Regards,

    Delaney