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: Line coverage didn't display all line numbers

Tool/software: Code Composer Studio

Hello , we  use CCS Tools ->Hardware Trace Analyzer -> open file  to import a .tdf file , and UlDspKeCpu.out , but  line Number didn't display all code run , just display some of the lines . how can we get all line number covered display in ccs ? Thanks!
  • Hi,

    The screenshot you sent seems that you are performing function Code Coverage. If you open the CCS Help, you can search for "Instruction Coverage" to learn how to access the actual instruction coverage.

    One detail, though: I see a status message that indicates "Bad Data". If you see many of these messages, there is a possibility the data collected is either incomplete or was corrupt during data collection. This can happen due to many reasons such as too much data throughput, insufficient buffer size or any potential delays on the host PC.

    Hope this helps,
    Rafael
  • Hi Rafael,

    For Instruction Coverage, for example ,C++ code  Line Number 508   related to many lines for assembly instruction , as i didn't know assembly instruction , how can i count this to C++ code , from CCS we can only know line 508 and 521 run, but exactually , in c++ code  line 509 ~ 521 also run , we want to get the coverage for C++ code.  Thank you!

  • Hi,

    I haven't performed Code Coverage on C++ code but, per your description and the Trace results, it seems that your code may be highly optimized, which would cause these apparent inconsistencies in execution.

    Can you try to either disable optimization or gather the trace information in another part of the code that is not optimized? You can also disable optimization in a single source file. For details on how to do that, check:
    software-dl.ti.com/.../ccs_project-management.html

    This will allow you to have visibility on how the code is behaving at source level.

    Hope this helps,
    Rafael
  • Hi,

    Thank you!

    Based on my currently job , how can i get a statistics file as coverage report ?  I have read the question "CCS: Are there any tools to crunch Code Coverage data from .csv files to make reports?" on forum , but i am not the same way with him , i didn't creat a project , i just import tdf file to generate the instruction coverage .

    BR

    Yan

  • Hi, Rafael,

            Thanks for your reply.

            I am Gao Yan's colleague .This morning, I have a discussion about her job and learned that we can see some type of coverage , like line/function/instructions. For instuctions coverage , my question is : how can I know which instructions have been covered  , which are not , by different test cases .

            For example, if the instructions coverage is 100%, then it is fine, that means all the branch/all the code has been tested. But if the instruction coverage is 50% by one case, 70% by another one case, then seems I will still not know which insrucstions of line of the source code are covered, which are not.Then How to handle the above situation ?

           As you know, the goal for anaylsising coverage is to improve the test coverage and improve the product quality itself.So we must get a way to understand which lines in one file or in one functionalities are not covered by the current test cases?

          Thanks.