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.
Tool/software: Code Composer Studio
Hello,
I am trying to execute the code coverage analysis but any time it returns the error:
Option --analyze is not valid with --gen_profile_info
But, actually I was following the manual of the TI optimizing ARM compiler and it requires those two options activated to perform code analysis. Where am I wrong? Thanks ahead.
-Marco
The option --analyze is valid only in combination with --use_profile_info, and not --gen_profile_info. Please search the TI ARM compiler manual for the sub-chapter titled Using Profile Information to Analyze Code Coverage.
Thanks and regards,
-George
To see code coverage information, these are steps.
1. Build with --gen_profile_info to create an instrumented executable
2. Run the instrumented executable. This causes profiling information to be collected. When execution ends, the collected profile information is dumped out to a file named pprofout.pdat.
3. Create the post-processed data file pprofout.prf with the profile data decoder armpdd. This command is run at the command line, and not from within CCS. The command invocation is similar to ...
armpdd -e instrumented_executable.out -o pprofout.prf pprofout.pdat
4. Build again to create the CSV files that contain the profile information. Remove the option --gen_profile_info and replace it with --use_profile_info=pprofout.prf.
This same information is in the compiler manual. But it does not take building with CCS into account.
Thanks and regards,
-George
Thanks for the help. I encountered 2 problems:
1)
armpdd -e instrumented_executable.out -o pprofout.prf pprofout.pdat
returns the following "warning"
warning: Invalid profile data offset 0x0 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x14 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x28 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x3c from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x50 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x5c from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x68 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x74 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x80 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x84 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x88 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x8c from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x90 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x94 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x98 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0x9c from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0xa0 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0xa4 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0xa8 from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0xac from data file pprofout.pdat. Possible mismatch between executable and data file warning: Invalid profile data offset 0xb0 from data file pprofout.pdat. Possible mismatch between executable and data file
2) when I remove the option --gen_profile_info, after specifying the location of the .prf and replace it with --use_profile_info=pprofout.prf, I build again but no .csv files are generated.
With regard to the warnings from armpdd ... Be sure the pprofout.pdat file was created by running the exact same instrumented executable which is specified with -e in the armpdd command.
Regarding ...
_MM_ said:2) when I remove the option --gen_profile_info, after specifying the location of the .prf and replace it with --use_profile_info=pprofout.prf, I build again but no .csv files are generated.
I suspect that, because of the problem with armpdd, you don't have a well formed pprofout.prf file.
Thanks and regards,
-George
George Mock said:Be sure the pprofout.pdat file was created by running the exact same instrumented executable which is specified with -e in the armpdd command
To be 100% sure of that I clean the project and I check that all the .out files are removed (furthermore I remove all .asm and .obj generated per .c/.h: clean build), and I delete also .pdat and .prf files.
Then, I build (with --gen_profile_info and everything else disabled), and I execute (debug with the MCU). The .out file is generated brand new
Afterwards, I execute:
armpdd -e instrumented_executable.out -o pprofout.prf pprofout.pdat
and I select the generated .prf and disable --gen_profile_info. I build and no .csv is generated.
Suggestions?
I'm confused on whether you correctly perform step 4 from my earlier post. Here it is again ...
George Mock said:4. Build again to create the CSV files that contain the profile information. Remove the option --gen_profile_info and replace it with --use_profile_info=pprofout.prf.
You say you remove --gen_profile_info. Do you also add --use_profile_info=pprofout.prf?
Thanks and regards,
-George
_MM_ said:and I select the generated .prf and disable --gen_profile_info. I build and no .csv is generated.
When I do that, yes, it adds --use_profile_info=pprofout.prf. No errors, but I get this warning even if I disabled --gen_profile_info :
#10247-D creating output section ".ppdata" without a SECTIONS specification
Thank for sending a test case by private channels. I have not figured it all out. But there is one problem which clearly needs to be addressed.
This warning from the linker ...
_MM_ said:#10247-D creating output section ".ppdata" without a SECTIONS specification
... means the .ppdata section is being allocated to memory in a default location that is almost certainly wrong. Be sure it is allocated to read/write memory, and not read-only memory like flash.
Thanks and regards,
-George
I continued to work with the same test case, but was not able to get any code coverage data. I filed the entry CODEGEN-6132 in the SDOWP system to have this investigated. You are welcome to follow it with the SDOWP link below in my signature.
Thanks and regards,
-George