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.

(BEGINNER) CCS 6.0.0 Breakpoints and Interrupts Issue

Hello!

Just to preface this post, I am a beginner and just started using CCS. I am having issues reading/writing through UART and have questions about some odd issues with breakpoints. I’m using CCS 6.0.0, debugging with an EK-LM4F120XL Stellaris launchpad.

Basically, I am trying to debug code that is supposed to send data through a uDMA channel to a transceiver. Right now when the code is run, a HWI is triggered to receive the read command from the transceiver, but then the code enters an infinite task loop and is unresponsive and no further interrupts are triggered.

After the initial read command, there is a modbus SWI that is supposed to result in sending the data, but it is never caught. Right before the code enters the task loop, the code will jump to a line in a case statement and point at the interrupt that I think is causing the issue even though the case statement is not met (shown below). 

For some reason, even though the code points to this line before crashing, any breakpoints set within the interrupt are never caught. It simply points to the line and then enters the task loop. Also, every time I set the breakpoint to this specific line, it never triggers even though I can manually step to it. Why is this?

I had initially assumed that the error lay somewhere in the Tx code that is accessed through the SWI posted above, but according to my breakpoints the code is never accessed. Is this just caused by improperly initializing the SWI?

So in summary: why is the breakpoint I set specifically at the SWI not triggering when I can manually step to the line right before the crash? I cannot step into the SWI and any breakpoints I set within it are not being triggered either.

I read somewhere that breakpoint oddities were often cause by low stack and heap sizes, but increasing both has had no effect.

Code available upon request.

Sorry if this is trivial, but I am a beginner. Any tips would help! 

  • ANCos said:
    Basically, I am trying to debug code that is supposed to send data through a uDMA channel to a transceiver. Right now when the code is run, a HWI is triggered to receive the read command from the transceiver, but then the code enters an infinite task loop and is unresponsive and no further interrupts are triggered.

    I'm afraid that we, in the CCS forum, may not be the right folks to help with debugging your code, however I can provide some comments on the breakpoint behavior you are seeing.

    ANCos said:
    Also, every time I set the breakpoint to this specific line, it never triggers even though I can manually step to it. Why is this?

    For some devices, the default setting is to disable interrupts when single stepping code. This appears to be the default for Tiva (see screenshot below for where this is set in CCS).

    ANCos said:
    So in summary: why is the breakpoint I set specifically at the SWI not triggering when I can manually step to the line right before the crash? I cannot step into the SWI and any breakpoints I set within it are not being triggered either.

    When you say "not triggering" do you mean that it is not getting set properly by CCS (ie, CCS is generating an error message when trying to set the breakpoint), or that the breakpoint is not getting hit. If it is the latter, then that is likely because the code is not reaching that point due to other reasons, and perhaps the crash is happening even before the breakpoint line is reached.

  • AartiG,

    Thanks for the reply. I realize this forum isn't for debugging, sorry if I made it seem that way. 

    I did not know about the default setting, so thanks for that.

    After some investigating I was able to confirm that I was not accessing the section of code at all (so you were right). 

    All that said, I'm still confused about why, when I single step after the beginning of the switch-case statement, the debug pointer points to a line that I was able to confirm is never accessed (shown in the image I linked, the highlighted swi_post line).

    Like you said, the most likely case is that there is some other error that happens before the breakpoint I set (at the beginning of the switch-case statement) that is causing the debugger to do weird things and then enter the infinite loop. Probably not a CCS issue.