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/AM3359: CCS 8.2 can hang when debugging a PRU

Part Number: AM3359
Other Parts Discussed in Thread: CCSTUDIO

Tool/software: Code Composer Studio

I was attempting to re-create the CCS crash under Linux reported in the related question when debugging a PRU.

The attached program was created using TI PRU compiler v2.3.1 for the PRU in a AM3359, run on a BeagleBone black clone connected with a Spectrum Digital XDS560v2 STM USB emulator. AM3359_PRU_debug.zip

The program doesn't cause CCS to exit with a crash, but causes CCS 8.2 to hang while debugging a PRU. Steps to recreate are:

a. In the debug project properties for the PRU core tick the "Halt at program termination (requires setting a breakpoint)" and "Enable CIO function use (requires setting a breakpoint)" options.

b. Start a manual debug session, connect to the Cortex-A8 core and run the PRU_ICSS -> PRU_ICSS_Init script to release the PRUs cores from reset. Terminate this manual debug session.

c. Start a debug session for the project, which loads the program into the PRU and halts at main.

d. Use Resume (F8) to run the program, which writes ten lines to the CIO console and halts at loader_exit.

e. Repeatedly use Step Into (F5). After 5 to 15 steps CCS hangs. Once the CCS GUI is no longer responding the CPU load shows CCS is using continuous CPU load on one of the CPU cores in the twelve core PC.

f. CCS has to be killed, and has created a hang_<guid>.dmp crash dump file.

For this post was using:

- Windows 10 Pro version 1803, OS build 17134.376
- CCS 8.2.0.00007 
- Debug Server 8.2.0.1409 com.ti.ccstudio.debugserver.win32.feature.group
- Sitara device support 1.4.3 com.ti.ccstudio.sitara.devicesupport.win32.feature.group
- TI Emulators 8.0.803.0 com.ti.emulation.pack.win32.feature.group
- Spectrum Digital Emulators 5.2.0.14 com.sd.ccstudio.emulation.win32.feature.group

The following is the CCS GUI after the hang:

After CCS had hung Process Explorer shows there is the thread 2372 taking continuous CPU on one of the twelve cores in the PC, and disassemble_pru.dll

is shown in the stack for the thread:

Attached is the CCS dump file created for the hung CCS process. hang_226_32328c80-5a4c-4067-ad4e-9037cb4a798c.zip

When this dump file was loaded into the WinDbg preview tool, at the time of the hang the active thread 0x944 (2372) had calls to disassemble_pru.dll on the stack:

  • CCS under Linux hangs is the same using:

    - Ubuntu 18.04.1 LTS
    - CCS 8.2.0.00007
    - Debug Server 8.2.0.1409 com.ti.ccstudio.debugserver.linux.feature.group
    - Sitara device support 1.4.3 com.ti.ccstudio.sitara.devicesupport.linux.feature.group
    - TI Emulators 8.0.803.0 com.ti.emulation.pack.linux.feature.group
     Spectrum Digital Emulators 6.2.0.02 com.sd.ccstudio.emulation.linux.feature.group

    The dump file after the hang is attached hang_71_3e5b086f-0b92-d2f5-522f1e76-33cf2902.zip

    The debug server log of the debug session which hung is attached (note that the uncompressed log is 2.9 GB!) https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/81/debug_5F00_server.7z

    Edit: Attach the dump file which matches the debug session for the debug_server.log

  • Chester,

    I can lock CCS with your application, but not with any of the typical PRU demo code that exercises peripherals.

    I wonder if something on the RTS library is confusing CCS.

    I will confinue my investigation tomorrow.

    Regards,
    Rafael
  • Chester,

    Sorry for the delay. Both CCSv8.1 with emupack 8.0.27.9 and CCSv8.2 with emupack 8.0.803.0 fail to perform C "step into" operations using either a Blackhawk XDS560v2 and a standalone XDS110. The source "Step Over" and all assembly step operations work fine, as well as breakpoints and "Run to Line" operations.

    All the operations were tested with the Disassembly or Memory Browser views opened or closed (this may influence the operation of the Disassembler).

    This also happens with the regular PRU demo and examples, but at a much later time in the code (many step operations are required to make it fail).

    I will file a bug report.

    I apologize for the inconvenience,
    Rafael
  • Chester,

    I filed the critical bug CCDSK-3366. In about half hour, please check its status in the link SDOWP in my signature below.

    I apologize for the inconvenience,
    Rafael