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.

CCSv4 - Debugger freezes when reloading .out file and cannot single step through C code

Hi,

I am using CCSv4 4.2.1.00004.  I have two issues that I'm encountering while debugging.

First, while debugging my project, CCS crashes if I attempt to re-load a .out file to one of the cores of my DSP (EVMC6472). 

Steps to reproduce issue: I am in debug mode running a project.  I halt the running core before building my project after making a change to the source code.  When finished building (and with no errors), a window pops up asking if I'd like to re-load the .out file.  I click 'Yes' and a progress bar appears.  The progress bar reaches completion but CCS then freezes and I have to force quit.

This bug isn't completely halting my progress; however it's been annoying to restart CCS and re-connect to my evaluation board every time this happens.

Second, I cannot single step through my C code at all locations.  Sometimes I am able to single step, other times the debugger will jump over a huge section of code and then halt again when I click the 'Step Over' button.  My project has the compiler options -g and -O2 among others.  Does optimization level -O2 cause C code to not directly match the generated assembly?  For example, I can put a breakpoint at certain lines of my C code, but if I click elsewhere the breakpoint will jump down to another line of code as if the C code really isn't related to what I'm debugging.  Is it the optimization level that causes me to be unable to put breakpoints wherever I wish?

Nick

  • Nick,

    Nick Bedbury78040 said:

    I am using CCSv4 4.2.1.00004.  I have two issues that I'm encountering while debugging.
    First, while debugging my project, CCS crashes if I attempt to re-load a .out file to one of the cores of my DSP (EVMC6472).
    Steps to reproduce issue: I am in debug mode running a project.  I halt the running core before building my project after making a change to the source code.  When finished building (and with no errors), a window pops up asking if I'd like to re-load the .out file.  I click 'Yes' and a progress bar appears.  The progress bar reaches completion but CCS then freezes and I have to force quit.
    This bug isn't completely halting my progress; however it's been annoying to restart CCS and re-connect to my evaluation board every time this happens.

    Although this behaviour in CCS is something that should not happen, I've seen issues where the device locks up and the emulator keeps trying to connect to it, freezing CCS. When this happens can you try to power cycle the board and see if you regain control of the CCS session?
    Also, several bug fixes were implemented in new releases of CCS, therefore you could try version 4.2.4. In order to not disrupt your existing development, you can install this version in a different directory and use a different workspace - they will not interfere with each other.
    Nick Bedbury78040 said:

    My project has the compiler options -g and -O2 among others.  Does optimization level -O2 cause C code to not directly match the generated assembly?  For example, I can put a breakpoint at certain lines of my C code, but if I click elsewhere the breakpoint will jump down to another line of code as if the C code really isn't related to what I'm debugging.  Is it the optimization level that causes me to be unable to put breakpoints wherever I wish?

    Yes, you are correct. The two scenarios you described are common whe optmization is used: it may inline functions or optimize the execution to a point where the direct source code correlation is lost.
    Regards,
    Rafael

  • Your clarification on optimization answers my question.  I posted on the forum so that TI would be aware of the issue of CCS freezing and could work on the bug for future CCS releases.

    Thanks!

    Nick