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.

  • TI Thinks Resolved

CC1312R: Code Coverage w/ CCS v10

Mastermind 19640 points

Replies: 9

Views: 133

Part Number: CC1312R

hi,

We are working on project with CC1312.

Is it possible to get Code Coverage with CCS v10 for CC1312?

Is there any guideline, as we are facinf some challenges in setting that on CCS v10?

thanks a lot in advance

KR

Vincenzo

  • Guru 55925 points

    I have moved your question to the Code composer Studio forum. Hopefully they will be able to answer your question.

    BR

    Siri

     

  • In reply to Siri:

    hi

    For development (building, loading program, etc.) everything works ok. But we want to check how many code is covered during program run (measure Code Coverage).

    We fail to setup it in CCS v10 – we think something wrong with profiler, but because it’s our first project with CC1312 and CCS we are not sure.

    thanks a lot in advance

    KR

    Vincenzo

  • Mastermind 340885 points

    In reply to Vincenzo Pizzolante:

    Hello Vincenzo,

    For ARM Cortex-M, you can try the compiler based coverage functionality:

    https://software-dl.ti.com/ccs/esd/documents/application_notes/appnote-code_coverage_compiler.html

    Another to feature is the SWO based trace. While you cannot get full code coverage data, it does support support statistical profiling, which can be useful in providing a general overview of which code is executed most often:

    https://dev.ti.com/tirex/explore/node?node=AAHa7.TEWJdAcHX00IcWtA__FUz-xrs__LATEST

    Thanks

    ki

    -----------------------------------

    Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

    Having CCS problems? Check out the CCS Troubleshooting Guide

    Looking for CCS Training/Documentation? Check out the CCS Resources page

    Curious about the status of a bug and know the tracking ID? Track it via the public bug tracking portal

    NOTE: When a bug is filed and a tracking ID is provided, the thread may then be suggested as "TI Thinks Resolved". Why? Please read the first FAQ of the CCS Forum Guidelines & FAQ

  • In reply to Ki:

    hi Ki,

    We tried compiler based coverage, unfortunately w/o success.

    We updated project with --gen_profile_info option, but after debug session termination there is no file pprofout.pdat.

    We also tried to add in the code _TI_stop_pprof_collection(), but we get a compilation error. We Use CC1312, probably we are missing some includes?

    thanks a lot in advance

    KR

    Vincenzo

  • In reply to Vincenzo Pizzolante:

    Vincenzo,

    Try adding extern void _TI_stop_pprof_collection(void);  at the top of the c file that has the call to _TI_stop_pprof_collection()

    I wrote that app note a week ago so it is pretty new (the feature has been around for a long time).  I will make this requirement more clear in the app note.

    Note that you will want to have the application setup to do the coverage capture and then push the coverage data in one shot.  I.e. setup some condition to triger the call to that function.

    Regards,

    John

     


    If my reply answers your question please click the "This resolved my issue" button

  • In reply to JohnS:

    hi John,

    it works, great.

    a very last question: is there a way to collect and analyze code coverage with CCS without having all source code, only compiler output file like *.out, *.map ?

    The goal is to provide the QA department a tool to measure their Tests quality – coverage during the production.

    thanks al ot in advance

    have a great day

    KR

    Vincenzo

  • In reply to Vincenzo Pizzolante:

    Vincenzo,

    I will confirm with the compiler team but I don't think this is possible with the armcl toolchain as that second bit of processing of the .prf is done by the compiler itself.  For our new Clang/LLVM based toolset I believe it is possible to do the analysis without source.  I am working on the app note for that toolset right now and it works differently and doesn't involve the compiler for the processing of the data.  Anyway I will check and get back to you.

    Regards,

    John

     


    If my reply answers your question please click the "This resolved my issue" button

  • In reply to JohnS:

    Vincenzo,

    I was able to confirm that you need access to source for the armcl solution but for the tiarmclang toolchain you can get the summary coverage information without source.  Basically it generates a report like this.  

    That much will work.  If you try to click on one of the source links in that report to get further details that would fail without source.

    Regards,

    John

     


    If my reply answers your question please click the "This resolved my issue" button

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.