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.

CCS/TM4C1290NCZAD: Cannot enable/disable (breakpoint) while the target is running when using J-link

Part Number: TM4C1290NCZAD
Other Parts Discussed in Thread: SEGGER

Tool/software: Code Composer Studio

Hi,

I am trying to get my J-link debugger to work with CCS 7 and TM4C129 uC.

Programming works fine and seems very fast but when I try to set a breakpoint while the target is running I get the following message: "Cannot enable/disable while the target is running". 

I looked for a solution and found that if I enable "Halt the target before any debugger access" option in debug settings in CCS, it is possible to set a breakpoint while target is running.

However, it says in CCS that enabling the above-mentioned option impacts servicing of interrupts and when I was using XDS100v2 debugger it was not necessary to enable it to set breakpoints while target was running.

Is there any other way to enable setting of breakpoints while target is running when using J-link debugger? Impacting servicing of interrupts does not seem like a good idea if it is not absolutely necessary. 

Thank you,

Peter A.

 

  • Peter,

    What is happening is that operations that require the debugger to halt the target are disabled if the target is running. In this case setting a software breakpoint requires the device to be halted, the breakpoint set, and then running the target again.

    There is an option in CCS to enable this while running and CCS will just perform those actions in the background. The issue with that is that if your system is running and expecting interrupts to be serviced then you could miss servicing the interrupts while the device is halted. Since users were not aware that the device was being halted in the background we disabled this by default.

    Now for some device and debug probe combinations you can perform that action while the device is running. If I setup my TM4C129 using the onboard debug probe it lets me set the breakpoint while running. In my case the breakpoint was in flash so it set a hardware breakpoint and did not need to halt the device to do that.

    If I try using a JLink on the same board I see the same as you. The breakpoint gets set but is not enabled. If I look at the breakpoints view I can see that in this case the breakpoint being set is a software breakpoint which would require the device to be halted to set.

    Unfortunately to set hardware breakpoints with JLink you need to use the SEGGER control panel. I found that if I use it to set a hardware breakpoint that it works correctly and can be done while the device is running.

    Regards,
    John
  • Hi John,
    Thank you for your answer.
    Could you tell where I can download the SEGGER control panel from? I followed the link that you provided but could not find it anywhere.
    I downloaded the "J-Link Software and Documentation Pack" but it looks like it does not contain the control panel.

    Thank you,
    Peter A.
  • Peter,

    If I search for it in Windows I can't find it.  However when I have my J-Link plugged in then I get an icon in the system tray at the bottom right of windows.  If I click on the icon there I can open the control panel.

    Here is the link for the software but I think you get everything you need from CCS now:

    https://www.segger.com/downloads/jlink/JLink_Windows_V614c.exe

    Regards,

    John

  • Hi John,
    It turns out that SEGGER control panel apears on my PC only after connecting to the target. Once I noticed it on the system tray I was able to set the HW breakpoint without any problems.
    Thank you for your help.

    P.S. Is there any way of suggesting new CCS functionality? It would probably be very useful if CCS supported HW BPs natively when using J-link.
  • I can talk with Segger about it. CCS does enable this today for other debug probes. However with the JLink integration the breakpoint management is handled at a lower level (within the Segger stack). They do it that way as they do offer extra functionality. I think if use of JLink with CCS becomes popular enough that the integration will be improved.

    Regards,
    John
  • That sounds good.
    Thank you for your help once again.