](images/DebugButton.png)
* Next you will need to run the application to collect the data and transfer it to the host workstation. If your application terminates naturally you can just click the **Resume** button.
[
](images/RunButton.png)
[[b Note:
If you added a call to **_TI_stop_pprof_collection()** to your application then it is suggested to set a breakpoint on the line immediately after it. Then run. Once the breakpoint has been hit the data should have been captured and transferred.
]]
* Terminate your debug session by clicking on the **Terminate** button.
[
](images/TerminateButton.png)
* A file called **pprofout.pdat** should be present in the build configuration folder of your project. In this case it would be in the **\Collect** folder.

###Analyzing the data
Now there are a couple of utilities that need to be run to prepare the code coverage data. We are going to leverage the Analyze configuration that we created earlier to do this.
Go to your project properties.
Ensure that the **Analyze** configuration is selected in the drop down at the top.

We need to now execute the **pdd** utility this will process the raw data file (pprofout.pdat) into a .prf file that can be interpreted by the compiler.
We are going to add a pre-build step to do this.
Select **Build** in the tree on the left.
Next select the **Steps** tab in the middle of the dialog.
We are now going to invoke the pdd utility. We pass it the program file, name of the file to output and the raw data file. We are going to make use of build variables to make this more robust. If you named your **Collect** configuration something else you will have to adjust the commands below.
[[y Warning:
The pdd utility is named differently for different compilers. It is recommended to copy and paste the appropriate command below into the pre-build step to ensure that it is added correctly.
]]
###MSP430:###
```
"${CG_TOOL_ROOT}/bin/pdd430" -e "${CCS_PROJECT_DIR}/Collect/${BuildArtifactFileName}" -o pprofout.prf "${CCS_PROJECT_DIR}/Collect/pprofout.pdat"
```
###Arm:###
```
"${CG_TOOL_ROOT}/bin/armpdd" -e "${CCS_PROJECT_DIR}/Collect/${BuildArtifactFileName}" -o pprofout.prf "${CCS_PROJECT_DIR}/Collect/pprofout.pdat"
```
###C2000:###
```
"${CG_TOOL_ROOT}/bin/pdd2000" -e "${CCS_PROJECT_DIR}/Collect/${BuildArtifactFileName}" -o pprofout.prf "${CCS_PROJECT_DIR}/Collect/pprofout.pdat"
```
###C6000:###
```
"${CG_TOOL_ROOT}/bin/pdd6x" -e "${CCS_PROJECT_DIR}/Collect/${BuildArtifactFileName}" -o pprofout.prf "${CCS_PROJECT_DIR}/Collect/pprofout.pdat"
```

We also need to set the compiler options to analyze the prf file.
In the tree on the left Select **Build -> Compiler -> Advanced Options -> Feedback and Analysis Options**"
Set the **Generate analysis info from profile data (--analyze)** to **codecov**.
Set the option to **Only generate analysis (--analyze_only)** as there is no need to complete the build process.
Go to the box for **Use profile feedback file(s) (--use_profile_info)** and click the +.
Add **pprofout.prf** as the file.

[[b Note:
If your prebuild step generates the prf file in a different location or with a different name then this will be need to be modified here as well.
]]
Now build the Analyze configuration by going to the down arrow beside the build button and selecting **Analyze**.

In the Analyze folder there will now be .csv files for each source file that has coverage information. You can open these in a spreadsheet program.

[[b Note:
There will be linker errors during the build of the **Analyze** configuration. This is expected as we are not doing a full build.
]]