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/MSP430FR5969: msp430fr5969 code coverage

Part Number: MSP430FR5969

Tool/software: Code Composer Studio

Hi Sir,

I am working on code coverage and profiling functionality in CCS. I have used the userguide for support(MSP430 Optimizing C/C++ Compiler v18.1.0.LTS). 

In section 3.5.1.4, it mentioned the sample code.

I have changed the MSP430 compiler flag sets accordingly(led_project ->Build_properties -> CCS build -> MSP430 compiler)

-vmspx --data_model=restricted --use_hw_mpy=F5 --include_path="C:/ti/ccsv8/ccs_base/msp430/include" --include_path="C:/Users/s/workspace_v8/led_project" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include" --advice:power="all" --advice:hw_config="all" --define=__MSP430FR5969__ -g --printf_support=minimal --diag_warning=225 --diag_wrap=off --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --gen_profile_info

When I done the above method, the .pdat file has to be created in the same directory. (as far as, if I am using the Tool instead of command line). But, I couldn't able to find it.

And also, If I use command line for processing the above method, then path inclusion causing error(missing files error). So, If I want to do the same in tool, is the above steps taken are correct?. how could we see this file and which folder.

From userguide point of view, I would like to implement below settings:

Phase 1:       

1. Compiler_invoke with --gen_profile_info

2. Generate instrumentation code(.pdat files)

3. Run .pdat file on target with I/ O sets.(Console I/ O)

4. Post process with PDD430 Profile data decoder.

5. consolidate files into .prf file

Phase 2:

1. run the .prf file using --user_profile_info=.prf_file

  • The .pdat file is created by running the instrumented executable.  Perhaps the discussion in this forum thread will be helpful.

    Thanks and regards,

    -George

  • cl430 --opt_level=2 --gen_profile_info foo.c --run_linker --output_file=foo.out --library=lnk.cmd --library=rts430.lib

    From the above code, I consider the commands as:

    cl430                          -> compiler invoke from CCS build properties itself

    --opt_level=2             -> optimization level 2 which can be added using commands

    --gen_profile_info     -> when enable --gen_profile_info from CCS build properties itself

    foo.c                           -> source file //Have to specify the path for this inorder to get the file from workspace

    --run_linker                -> linker  invoke from CCS build properties itself 

    --output_file=foo.out -> ouput file 

    --library=lnk.cmd       -> library which is linked from CCS build properties itself 

    --library=rts430.lib     -> library which is linked from CCS build properties itself 

    When I entered like this in MSP430 compiler box, the ..pdat file was not creating. Is the steps taken above are correct.

    And, source code makefile is run by the CCS. So, If I want to work in command line, how could this possible?

  • sadasivam arumugam said:
    When I entered like this in MSP430 compiler box, the ..pdat file was not creating. Is the steps taken above are correct.

    please recall George's comment above:

    George Mock said:
    The .pdat file is created by running the instrumented executable.

    You need to actually run the generated program to generate the .pdat file. Please see the thread George mentioned above:

    https://e2e.ti.com/support/tools/ccs/f/81/t/552618

    Once the .pdat file is generated, you would then pass that file to the pdd430 utility to generate a .prf file that can be used by the compiler to generate the profile/coverage information

    Please carefully read section 3.7 of the user's guide for full details:

    http://dev.ti.com/tirex/explore/node?node=ALjd27ZkGG0N.2DkrNHGSg__FUz-xrs__LATEST

  • By referring to the link: https://e2e.ti.com/support/tools/ccs/f/81/t/552618, how to use  _TI_stop_pprof_collection. 

  • sadasivam arumugam said:
    how to use  _TI_stop_pprof_collection

    It is a void function which takes no arguments.  Just call it at the appropriate point.  The linker brings it in from the RTS library, and makes it part of the program.

    Thanks and regards,

    -George