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/CCSTUDIO: Unable to connect to AM3358 PRU with Blackhawk USB100v2 using CCS 7.1.0

Part Number: CCSTUDIO

Tool/software: Code Composer Studio

My target is a Beaglebone Green.  I can connect successfully to the Cortex A8, so I know the basics of my hardware and configuration are correct - but I cannot connect to the PRU modules, it gets stuck at 'Connecting : Running'.  CCS does not crash.

Enabling DebugServer logging I get the attached output from just opening CCS, attempting to connect, waiting ~3 seconds, then disconnecting and exiting the application.

https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/81/output.7z

If I search for connection changes:

grep -n 'Connection state changed' ./output.txt 
12974:0x7F804F61A700 37983 3 IcePick_D_0 STATE I: Connection state changed to 4
12979:0x7F804F61A700 38009 3 IcePick_D_0 STATE I: Connection state changed to 0
13271:0x7F804F61A700 38116 3 CS_DAP_M3 STATE I: Connection state changed to 4
13279:0x7F804F61A700 38118 3 CS_DAP_M3 STATE I: Connection state changed to 0
16390:0x7F804F61A700 38451 3 CS_DAP_DebugSS STATE I: Connection state changed to 4
16406:0x7F804F61A700 38453 3 CS_DAP_DebugSS STATE I: Connection state changed to 0
16810:0x7F804F61A700 38473 3 PRU_0 STATE I: Connection state changed to 4
// The disconnection occurred between these two lines 60392:0x7F80C4B52700 47707 3 PRU_0 STATE I: Connection state changed to 3 60494:0x7F804F61A700 47724 3 PRU_0 STATE I: Connection state changed to 2 60498:0x7F804F61A700 47724 3 CS_DAP_DebugSS STATE I: Connection state changed to 3 60638:0x7F804F61A700 48032 3 CS_DAP_DebugSS STATE I: Connection state changed to 2

As you can see PRU0's connection state never transitions to '0' unlike the other devices in the chain.  The debug around 'IcePick_D' is:

0x7F804F61A700 37983 3 IcePick_D_0 STATE I: Connection state changed to 4
0x7F804F61A700 37983 3 IcePick_D_0 GTI C: GTI_STAT( 0x00007F80482635C0 )
0x7F804F61A700 38009 3 IcePick_D_0 GTI R: GTI_STAT( 0x00007F80482635C0 ) = 0x0000000E
0x7F804F61A700 38009 3 IcePick_D_0 STATE I: Target execution state changed to STATUS_NON_DEBUG_CHANGE
0x7F804F61A700 38009 3 IcePick_D_0 STATE I: Debugger execution state changed to EVENT_DSP_HALT
0x7F804F61A700 38009 3 IcePick_D_0 STATE I: Connection state changed to 0

Notice the 'GTI_STAT' return value is non-zero, that is the case for all the devices, except PRU0:

0x7F804F61A700 38473 3 PRU_0 STATE I: Connection state changed to 4
0x7F804F61A700 38473 3 PRU_0 GTI C: GTI_STAT( 0x00007F8048FAA6B0 )
0x7F804F61A700 38476 3 PRU_0 GTI R: GTI_STAT( 0x00007F8048FAA6B0 ) = 0x00000000
0x7F804F61A700 38476 3 PRU_0 STATE I: Target execution state changed to STATUS_RUNNING
0x7F804F61A700 38476 3 PRU_0 STATE I: Debugger execution state changed to EVENT_DSP_RUN
0x7F804F61A700 38476 3 CS_DAP_DebugSS GEL I: Evaluating "OnChildRunning()"
0x7F804F61A700 38476 3 CS_DAP_DebugSS POLL D: New request of type DSP_RQ_NONE added to polling loop by N12_GLOBAL__N_123NullRequestNotificationE
0x7F804F61A700 38476 3 PRU_0 POLL C: Firing DSP_ALREADY_RUNNING to all DSP_USER's
0x7F804F61A700 38476 3  COM_DBG_IF C: 11DSP_CO_USER::OnAlreadyRunning()
0x7F804F61A700 38476 3  COM_DBG_IF R: 11DSP_CO_USER::OnAlreadyRunning()
0x7F804F61A700 38476 3  COM_DBG_IF C: 11DSP_CO_USER::OnAllowedUserAccessesChanged()
0x7F804F61A700 38476 3  XPCOM C: ( (dsISimpleEventCallback*)0x7f809808c1f0 )->onEvent()
0x7F804F61A700 38476 3  XPCOM R: ( (dsISimpleEventCallback*)0x7f809808c1f0 )->onEvent() = 0x00000000
0x7F804F61A700 38476 3  COM_DBG_IF R: 11DSP_CO_USER::OnAllowedUserAccessesChanged()
0x7F804F61A700 38476 3  COM_DBG_IF C: 11DSP_CO_USER::OnExecutionStatusChanged()
0x7F804F61A700 38476 3  XPCOM C: ( (dsISimpleEventCallback*)0x7f809808b890 )->onEvent()
0x7F804F61A700 38476 3  XPCOM C: ( (dsIRunControl*)0x7f8098088a80 )->getExecutionState( 0x7f804f6176b0, 0x7f804f6176c8, 0x7f804f6176e0, 0x7f804f6176f8 )
0x7F804F61A700 38476 3  XPCOM R: ( (dsIRunControl*)0x7f8098088a80 )->getExecutionState( *0x7f804f6176b0 = true, *0x7f804f6176c8 = false, *0x7f804f6176e0 = 0x00000005, *0x7f804f6176f8 = 0x00000001 ) = 0x00000000
0x7F804F61A700 38476 3  XPCOM R: ( (dsISimpleEventCallback*)0x7f809808b890 )->onEvent() = 0x00000000
0x7F804F61A700 38476 3  COM_DBG_IF R: 11DSP_CO_USER::OnExecutionStatusChanged()
0x7F804F61A700 38476 3 PRU_0 POLL C: Firing of DSP_ALREADY_RUNNING complete

It looks like the error is occurring because the PRU is already running, which it is as I have code loaded into them by Linux on boot - this is the code I wish to debug.  Has anyone else experienced this?  What I am doing wrong?

  • Hi,

    Please apologize for the delay; are you still having this issue?

    What distro are you using? I couldn't reproduce this in CCSv7.1 on Ubuntu 14.04 but, if you are running Ubuntu 16.04, I suspect you are running into the bug CODEGEN-1941 (its status can be checked in the link SDOWP in my signature below).

    Regards,
    Rafael
  • Apologies for my delay, I've been away with work.

    I'm running Fedora 25 so there may be library mismatch that is causing the issue, I'll try running Ubuntu 14.04 in a VM.  I'm not suffering from CODEGEN-1941 as my CCS has never crashed whilst doing this.

    Did the log I posted shed any light on the issue?