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: Linux CCSv7/CCSv8 crashes when attempting to debug on the PRU

Other Parts Discussed in Thread: AM4378, BEAGLEBOARD-X15, AM5728, AM3359

Tool/software: Code Composer Studio

Hello,

We are using CCSv7/CCSv8 on CentOS 7 64-bit OS. It works fine for all C6x/ARM development tasks.

When trying to debug programs on the PRU however, it crashes. The crash happens with CCSv7 as well as CCSv8. Replicating the crash is easy.

Just load any .out file (it can be a from a simple "HelloPRU" C code or any assembly code) on the PRU  It loads successfully and goes to the main() function.

Press "F6" to step over and it crashes.

However, if you set a breakpoint and press "F8", it goes and stops at the breakpoint. Press "F6" again, and it crashes.

The crash happens irrespective of the JTAG or the EVM. We could replicate the crash on the beaglebone black as well as the AM4378 IDK

The same project when copied to Windows 10  and CCSv7/CCSv8 works fine.

Tried to check if this issue is already known and has been reported, but did not find anything. Is there a fix for this issue? Please let me know if any further information is required.

Thanks, Krishna

  • Krishna Nagarajan said:
    Tried to check if this issue is already known and has been reported, but did not find anything.

    I remember seeing similar reports of this before, and in a search found CCS 6.2 and 6.1.3 crash when connect to BeagleBoneBlack am335x PRU using XDS100v2 or XDS200 debugger. I can't see a defect number being raised for this, since at the time think TI couldn't repeat the failure.

    I also did try and search the list of known CCS 8 issues, but when try and follow the known issue link at http://software-dl.ti.com/ccs/esd/CCSv8/CCS_8_2_0/exports/CCS_8.2.0_ReleaseNotes.htm#_Known_Issues get the error:

  • Krishna Nagarajan said:
    The crash happens irrespective of the JTAG or the EVM.

    I tried repeating using CCS 8.2.0.00007 running under Ubuntu 18.04.1 LTS but haven't managed to repeat the crash when debugging a PRU. Used both:

    a) A BeagleBoard-X15 (AM5728) connected with a Spectrum Digital XDS560v2 STM USB emulator.

    b) A BeagleBoard black clone (AM3359) connected with a Spectrum Digital XDS560v2 STM USB emulator.

    Do you have any crash logs you can attach?

    Also, trying enabling Debug Server Logging and attach the log from when CCS crashes.

    Edit: Added test of AM3359 as well as AM5728

  • Thank you for the prompt response.

    I have attached the dmp and log files. We used the following to generate the dmp/log files:

    CCS 8.1.0.00011 on CentOS 7.4.1708 64-bit, Blackhawk USB560v2 System Trace and Beaglebone Black.

    Let us know if you need any further details.

    Thanks, Krishnapru_dump_log.zip.0.00011

  • Krishna, Chester,

    There was a very similar bug report that was fixed in CCSv7.3.0:
    e2e.ti.com/.../596196

    I can't reproduce this issue in CCSv8.2.0 with Ubuntu 16.04 and 18.04 and my BeagleBone Black connected to both my XDS110 Debug Probe and my Blackhawk XDS560v2 STM.

    I wonder what else may be at play in this case. Could you try with CCSv8.2.0?

    Regards,
    Rafael
  • Krishna Nagarajan said:
    I have attached the dmp and log files.

    Your debug server log ends with:

    0x7F18481BA700 267437 3 PRU_0 TPI C: TpiSvrStepAPI( *0x7f186d1391c0, TPI_STEP_CMD_GET_CACHE_SIZE, *0x7f18481b8a30 )
    0x7F18481BA700 267437 3 PRU_0 TPI R: TpiSvrStepAPI( *0x7f186d1391c0, TPI_STEP_CMD_GET_CACHE_SIZE, *0x7f18481b8a30 = 0x00000004 ) = 0x00000000
    0x7F18481BA700 267437 3 PRU_0 TPI C: TpiSvrStepAPI( *0x7f186d1391c0, TPI_STEP_CMD_MAP_STEPTYPE, 0x00007F18000032CE, *0x7f18481b8ad0 )
    0x7F18481BA700 267437 3 PRU_0 TPI C: TpiHostStepAPI( *0x7f186d138f30, TPI_STEP_CALLBACK_GET_PC, *0x7f18481b876c )
    0x7F18481BA700 267437 3 PRU_0 TPI R: TpiHostStepAPI( *0x7f186d138f30, TPI_STEP_CALLBACK_GET_PC, *0x7f18481b876c = 0x0000001C ) = 0x00000000
    0x7F18481BA700 267437 3 PRU_0 TPI R: TpiSvrStepAPI( *0x7f186d1391c0, TPI_STEP_CMD_MAP_STEPTYPE, 0x00007F18000032CE, *0x7f18481b8ad0 = 0x000032CE ) = 0x00000000
    0x7F18481BA700 267437 3 PRU_0 TPI C: TpiSvrStepAPI( *0x7f186d1391c0, TPI_STEP_CMD_GET_CACHE_SIZE, *0x7f18481b89f0 )
    0x7F18481BA700 267437 3 PRU_0 TPI R: TpiSvrStepAPI( *0x7f186d1391c0, TPI_STEP_CMD_GET_CACHE_SIZE, *0x7f18481b89f0 = 0x00000004 ) = 0x00000000
    0x7F18481BA700 267437 3 PRU_0 TPI C: TpiSvrStepAPI( *0x7f186d1391c0, TPI_STEP_CMD_STEP_OVER, 0x00007F1800000000, 0x0000000000000000, 0x00007F186D139030, *0x7f186d139028 )
    0x7F18481BA700 267437 3 PRU_0 TPI C: TpiHostStepAPI( *0x7f186d138f30, TPI_STEP_CALLBACK_GET_PC, *0x7f18481b870c )
    0x7F18481BA700 267437 3 PRU_0 TPI R: TpiHostStepAPI( *0x7f186d138f30, TPI_STEP_CALLBACK_GET_PC, *0x7f18481b870c = 0x0000001C ) = 0x00000000
    0x7F18481BA700 267509 1  ERT E: A crash occurred - dump file written to "/home/COUTHIT.LOCAL/krishna/.ti/ti/2/dmp/"

    I.e. the crash appears to occur after the TpiHostStepAPI has been called for TPI_STEP_CALLBACK_GET_PC.

    While I couldn't repeat the crash, I did get CCS to hang when debugging a PRU - see CCS/AM3359: CCS 8.2 can hang when debugging a PRU. Once hung the debug server log shows repeated calls to TpiHostStepAPI and TpiHostStepAPI for the PRU. Not sure if this is same problem with different symptoms or a different problem.

  • Hi Rafeal,

    We upgraded CCS to 8.2.0.00007 on the CentOS 7.4, and the issue still persists.

    Since this is not reproducible on Ubuntu, then this could be due to some incompatibility with CentOS 7.

    Thanks, Krishna

  • Krishna,

    Please apologize for the delay; I missed your last reply.

    Unfortunately CentOS is not tested nor officially supported, therefore you may be right that this issue can be related to this OS.

    However, Chester's report is still under investigation and therefore it may be something still outstanding. If you can send the code or a smaller testcase that reproduces this issue, that may help get to the bottom of this issue quicker.

    I apologize for the inconvenience,
    Rafael
  • Hi Rafael,

    No problem. I understand that CentOS is not officially supported.

    It could also be that the issue is observed right away on the CentOS 7. As I had mentioned earlier, loading any .out on the PRU (CCSv8/CentOS) and pressing F6 crashes the CCS. I have already shared the logs in an earlier post.

    As soon as Chester's report is addressed and the CCS patch becomes available, we will test again and post an update.

    Thanks, Krishna