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.

Connecting to running target in code composer 6.12

Other Parts Discussed in Thread: TMS320F28069

C28xx: Error connecting to the target: (Error -1133 @ 0x0) Device blocked debug access because it is currently executing non-debuggable code. You may retry after the device has had time to enter debuggable code, or you may cancel, disable realtime mode, and then attempt to connect. (Emulation package 6.0.407.3)

Tried various options enabling polite mode, realtime mode etc.  Using XDS200 debugger if that matters.

  • Rick,

    If you wish to connect to a device that is already running code from Flash, please check this video clip. The key here is that you have to set the Debug settings to "Load Symbols only" instead of "Load Program" if you enable real-time mode prior to launching the debugger.

    If you wish to use Real-time mode for debugging in a case where you are also loading code to target (rather than only loading symbols) then you would need to launch the debugger manually, then connect to target and load the program prior to enabling real-time mode. 

    Please see the Real-time Debug section in this wiki page: http://processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS#C2000
    It links to a training module that has more information.

  • I watched the video and seem to have the debugger setup correctly but still am getting the error. Sorry if I mislead you. I'm using a TMS320F28069 processor with a XDS100v2 debugger. Can I connect to a running TMS320F28069?
  • Rick Johnson said:
    I'm using a TMS320F28069 processor with a XDS100v2 debugger. Can I connect to a running TMS320F28069?

    Yes that should work. 

  • I believe I have everything set correctly. I watched video. I have a debug configuration which erases and loads the program and then allows me to set breakpoints and examine registers. If I change that configuration to enable realtime mode and enable polite mode then that configuration throws the same 1133 error. It doesn't look like I can connect to a running TMS320F28069.
  • Rick Johnson said:
    I have a debug configuration which erases and loads the program and then allows me to set breakpoints and examine registers.

    The key here is whether the debug configuration is set to "Load program" or "Load symbols only". This is set in the "Program" tab in the Debug Configuration. "Load Program" assumes the program is already running in Flash hence it only needs to load symbols for debugging and not the entire program. What is the setting in your project?

  • I believe the setting are correct

    On Program tab
    I am only loading symbols.

    On target tab
    Program/Memory Load options
    Disable all breakpoints when loading a different program checked
    Fast verification selected
    Halt target on a connect checked
    Disable interrupts when assembly stepping checked
    Disable interrupts when source stepping checked
    Reset the target on a program load or restart
    Auto Run and Launch options
    Launch options connect to the target on debugger startup checked
    Misc/Other options
    Never selected
    Simulators will flush the pipeline on a halt checked
    Automatically step over functions without debug information when source stepping checked
    Allow software breakpoints to be used checked
    TMS320F28069 Flash Settings
    Verify only
  • Rick Johnson said:
    Reset the target on a program load or restart

    I think it may have to do with this option. Can you try disabling that and see if it helps?

  • Tried lots of combinations of checkboxes. Even tried "Continue debug launch if target connect or program load fails" and then tried using the connection icon on the tool bar. Same error can't connect. Will talk to hardware designer to try to find out if they did anything special.
  • Think I figured it out. In my debugging configuration the "enable realtime mode" icon was not selected. When I selected this icon in while in my debugging configuration, a dialog box popped up stating something about setting a bit "ST" I think. I answered yes and then used the disconnect button to disconnect the emulator and pressed the stop button. Then when I ran my "attach only debug configuration", the emulator was able to connect into a running target. I am not sure what the "ST" bit does, or if that bit was set or if that should be set in the boot up code of the processor to enable connecting to a running target.
  • Glad to hear that you were able to get things working.

    Rick Johnson said:
    I am not sure what the "ST" bit does, or if that bit was set or if that should be set in the boot up code of the processor to enable connecting to a running target.

    There is a debug enable mask bit (DBGM) in status register ST1 that controls whether memory accesses and halts issued by the debugger are blocked or not in real-time mode. This bit can be set by hardware or the application, so the message you saw would depend on the state of the bit at that point in time.

    There is some more information on this in the Real-time debug training module and the C28x CPU and Instruction Set Users Guide, both of which are linked from this wiki section.

  • It was a late night. Yes it is the DBGM bit in register ST1 which was causing the problem. That needs to be set to 0 to allow connecting to running target.