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.

Can't single step CCS5 after flash programming



I'm using CCS5.1.1 on my own target '334 board using XDS510PP emulator and have the following issue:

1) Start debug session with symbols loaded from .out file

2) Set hardware breakpoint in code. Run code and hit breakpoint and I am able to single step through the code(F5 or F6) with no problem.

3) Change code and re-program flash.(Breakpoint is still set)

4) Now when run and hit the breakpoint, I get the following error when I try to single step:

C28xx: Trouble Setting Breakpoint with the Action "Continue or Finish Stepping" at 0x3228bf: Error 0x00000008/-2048 Error during: Break Point,  Unable to set hardware watchpoint 1 at 0x003228BF. Watchpoint 1 is already in use. Some hardware breakpoints may be used by analysis.  

If I view my breakpoints, the only one that's set is the same one from steps 1-3. Why am I now getting "Watchpoint 1 is already in use. Some hardware breakpoints may be used by analysis", and how do I clear this so I can single step? I don't see any option to view "Watchpoints" so I can't see if any are set.

This appears to be a problem with your programming tools leaving breakpoints/watchpoints in memory after exiting.

  • Hi Bob,

    watchpoints are shown in the breakpoints view.  So please check there. 

    Also have a look at your debug settings.  CCS typically does try to reload breakpoints from a previous session, and especially if you are using hardware breakpoints there can only be a limited number depending on your device.

    Please check these two points and keep us informed.

    Best Regards,
    Lisa

  • Hi Lisa,

     Only my (known) breakpoints are show in the breakpoint window. There's no watchpoints shown, unless there's some setting I need to change to see the watchpoints. I've also tried using the "remove all breakpoints" button. Then setting my breakpoint again. No luck.

    I also tried turning off the C I/O breakpoints with no luck. It's very repeatable.

  • Hi Bob,

    ok, have you tried v5.2?  Can you send us a small test case that shows the behaviour?

    Best Regards,

    Lisa

  • I have not tried 5.2.

     Are you able to successfully program your target flash, then set a breakpoint and single step from the breakpoint on your setup?

  • Bob,

    There is a chance a breakpoint is being used by CIO (IE, for printf) in one case but not the other. Could you try disabling the CIO breakpoint by going to Tools -> Debugger Options -> Generic Debugger options, and uncheck the "Enable CIO function use" item?  The "Halt at program termination" item can also use a breakpoint, but it is normally off by default.

    I don't see the specific problem are running into in either 5.1 or 5.2, but I don't have the same emulator.

  • Hi Andy,

     I've already tried that (see post #3).

    Also, I tried installing v5.2 and the installation crashed. I haven't had a chance to go back and see what happened. I'll get to that later today.

    Any other ideas?

  • Sorry, missed post #3.

    After you reach the point where you cannot single step, could you enter "DEBUG_DumpBreakpoints()" in the expressions view and post the output that appears in the console view here? This dumps the debugger's view of what breakpoints are set.

    One other question: are either of the programs you are loading BIOS programs?

  • I'll try that. I use my own OS.

  • Here's the breakpoint dump results from before programming and after programming. There's a difference of 1 breakpoint. Please let me know how to disable the extra one set by the system.

    Before Programming with 1 user breakpoint set:

    C28xx: Breakpoint Manager Dump: Total Allocated Logical Breakpoints: 6

    C28xx: Breakpoint Manager Dump: Total Allocated Software Physical Breakpoints: 4

    C28xx: Breakpoint Manager Dump: Total Allocated Legacy Hardware Physical Breakpoints: 4

    C28xx: Breakpoint Manager Dump: Total Allocated 55 Hardware Physical Breakpoints: 0

    C28xx: Breakpoint Manager Dump: Total Allocated Thread Physical Breakpoints: 0

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump: Enabled: 1

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: C:\Documents and Settings\bob\My Documents\...(0x3228ba)

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Remain Halted

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name: Hardware Breakpoint

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the user

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump: Disabled: 5

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: "C$$IOE$$"

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Process CIO

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name:

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the system

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: "C$$IO$$"

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Process CIO

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name:

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the system

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: "C$$EXIT" (0x327f72)

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Terminate Program Execution

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name:

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the system

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: "C$$EXITE"

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Terminate Program Execution

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name:

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the system

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: C:\Documents and Settings\...(0x3228d4)  (I edited out the path)

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Remain Halted

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name: Hardware Breakpoint

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the user

    _________________________________________________________________________________________________________________________________

    After programming with 1 user breakpoint set:

    C28xx: Breakpoint Manager Dump: Total Allocated Logical Breakpoints: 7

    C28xx: Breakpoint Manager Dump: Total Allocated Software Physical Breakpoints: 4

    C28xx: Breakpoint Manager Dump: Total Allocated Legacy Hardware Physical Breakpoints: 5

    C28xx: Breakpoint Manager Dump: Total Allocated 55 Hardware Physical Breakpoints: 0

    C28xx: Breakpoint Manager Dump: Total Allocated Thread Physical Breakpoints: 0

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump: Enabled: 1

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: C:\Documents and Settings\... (0x3228ba) (I edited out the path)

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Remain Halted

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name: Hardware Breakpoint

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the user

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump: Disabled: 6

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: "C$$IOE$$"

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Process CIO

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name:

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the system

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: "C$$IO$$"

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Process CIO

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name:

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the system

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: "C$$EXIT" (0x327f72)

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Terminate Program Execution

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name:

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the system

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: "C$$EXITE"

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Terminate Program Execution

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name:

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the system

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: 0x3228bf

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Continue or Finish Stepping

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name:

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the system

    C28xx: Breakpoint Manager Dump:

    C28xx: Breakpoint Manager Dump:     Hardware Configuration

    C28xx: Breakpoint Manager Dump:         Location: C:\Documents and Settings\...(0x3228d4)

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:     Debugger Response

    C28xx: Breakpoint Manager Dump:         Condition:

    C28xx: Breakpoint Manager Dump:         Skip Count: 0

    C28xx: Breakpoint Manager Dump:             Current Count: 0

    C28xx: Breakpoint Manager Dump:         Action: Remain Halted

    C28xx: Breakpoint Manager Dump:     Miscellaneous

    C28xx: Breakpoint Manager Dump:         Group: Default Group

    C28xx: Breakpoint Manager Dump:         Name: Hardware Breakpoint

    C28xx: Breakpoint Manager Dump:     Breakpoint set by the user

  • I think I see where CCS5 is screwing up. If I have breakpoints in the breakpoint window during programming, when the system returns from programming, those breakpoints are showing up in the "disabled" section of the breakpoint dump. If there's more than 1 breakpoint in the window when programming is initiated (even though they're disabled), the problem occurs once I go to run after programming. So it seems CCS is saying that even though all but one breakpoint is disabled, it still can't single step. This behavior does not happen before programming (ie I can have multiple breakpoints disabled in the window, as long as only 1 is enabled I can single step).

    Do you know how to fix/correct this?

  • Bob,

    There are two internal paths through which breakpoints can be set. Your configuration is going through the "legacy" method instead of the newer method. The legacy APIs exist to maintain compatibility with certain older devices and emulators. I'm not sure why your configuration is going through the legacy APIs, but the problem you see might be caused by this.  I don't have access to an XDS510PP to test this specific configuration, but by forcing a XDS510USB through the same path I still don't see this problem.Nevertheless, it could still have something to do with what you see.

    Have you, by chance, been asked to rename a file called "ctools.dll" located in ccsv5\ccs_base\emulation\analysis\bin , perhaps to address a different problem?  If so, could you rename it back and retry this particular test case? This could be one reason your configuration uses the legacy APIs.

  • That was it! My ctools had been renamed at some point and not changed back. Breakpoints are now working as expected. Thank you.

  • Hi Bob,

    very glad to hear and all the best with development.

    Thanks for the help Andy!

    Best Regards,
    Lisa

  • I don't have ccsv5\ccs_base\emulation\analysis\bin folder :(

    but same problem...