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.

code coverage on a target application



Hi,

One of our customer is facing below issue with compiler option "--gen_profile_info".

Below is his query.Please respond.

e2e.ti.com/.../2018788

"I am developping an application that runs on a TDA3x Processor. I have developped some functionalities and now i am doing unit test. I would like to see the code coverage when compiling the whole application.

I am using the ARMCL compiler and ARMAR. I have seen on ARM documentation that an compilation option "--gen_profile_info" exists that instrumentalizes the code to later generate a code coverage report, but when I use that option in compilation an error "armpprof: No such file or directory" appears.

Has anyone ever made unit testing on target with an TDA3x processor and an ARM compiler? Could anyone please give me a hint on how to integrate, compile and execute the unit tests on target in order to check the code coverage?

PD: To generate the unit tests I am using UNITY (opensource framework). Other suggestions are welcome

Thank you very much in advance"

  • What version of the compiler do you use?  If you have CCS installed, then the compiler executables are located in a directory similar to ...

    C:\ti\ccsv6\tools\compiler\ti-cgt-arm_16.9.0.LTS\bin

    Does this directory have an executable named armpprof.exe?

    Thanks and regards,

    -George

  • Hi,

    I am using the compiler: ti-cgt-arm_15.12.1.LTS on Linux.

    /home/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin

    And yes, there is an executable named armpprof

    thanks and regards,

    Javier

  • Well, nothing appears wrong so far.  More questions ...

    Please try the following ...

    C:\some\dir\path>armpprof --help
    Usage: armpprof [-options] filename
    
    This tool is designed to be invoked by the compiler.

    That command directly invokes armpprof.  The command is found on the system path.  That is the output you should see.  What happens in your case?

    Please show, by copy-n-paste, the compiler invocation and diagnostics that include "armpprof: No such file or directory".

    Thanks and regards,

    -George

  • Hi George,

    I solved that problem with arpprof but now I get another error while compiling. 

    "Error when opening input icode file : /tmp/15079SzTKs6p, Aborting"

    I just used the following command to a hello-world-file to check the functionality of "--gen_profile_info"

    /home/.../ti_components/cg_tools/linux/ti-cgt-arm_5.2.5/bin/armcl --gen_profile_info file.c 

    I have looked in the forum for similar problems and I found that it also happened to other people but I haven't found a solution for it. 

    Have you ever encountered this error?

    Thanks

    Javier

  • Hello George,

    sorry but i talked about two differents compilers in my question and I mixed both of them, I just relized.

    I am interested in the compiler: /home/.../ti_components/cg_tools/linux/ti-cgt-arm_5.2.5/bin/armcl

    I have seen the help menu (amrcl --help) of it and I haven't found any option to instrument the code while compiling in order to check source code coverage.

    Do you know if there is an option like "--ftest-coverage " of gcc but for the ARM-compiler?

    Thanks!
    Javier
  • Javier Garcia24 said:
    Do you know if there is an option like "--ftest-coverage " of gcc but for the ARM-compiler?

    Yes.  Please see the section of the ARM compiler manual titled Using Profile Information to Analyze Code Coverage.

    Thanks and regards,

    -George

  • Using the --gen_profile_info explained on the pdf of your link I get the error: 

    >> Error when opening input icode file : /tmp/15471q2VHdkp, Aborting

    I have tried to change the path with the option: "armcl --gen_profile_info -ft . file.c "and I get the following error: 

    >> Error when opening input icode file : ./file.ifp, Aborting

    I have seen in the forum that some other people also encountered this error but I couldn't find a solution yet. 

    Do you know please how could I solve this? Does it matter that I am using linux?

    Thanks!

    Javier

  • Javier Garcia24 said:

    Using the --gen_profile_info explained on the pdf of your link I get the error: 

    >> Error when opening input icode file : /tmp/15471q2VHdkp, Aborting

    What compiler version are you using?  This thread mentions versions 15.12.x.LTS and 5.2.x.  The option --gen_profile_info does not work with the 5.2.x releases.  You have to use version 15.12.x.LTS or later.

    Thanks and regards,

    -George

  • Ah! ok!

    I am using: /home/.../ti_components/cg_tools/linux/ti-cgt-arm_5.2.5/bin/armcl 

    Is there with this compiler (release 5.2.5) an option similar to "--gen_profile_info" ? I would need to check source code coverage with this compiler 

    Thanks

    Javier

  • Javier Garcia24 said:
    Is there with this compiler (release 5.2.5) an option similar to "--gen_profile_info" ?

    Unfortunately, no.

    Thanks and regards,

    -George