flow

activate

Right click project and select properties
projectproperty.jpg

Select C Coverage category and turn on the Activate nature checkbox
activate.jpg

compiler option settings

Select C/C++ Build Setting and add "-fprofile-arcs -ftest-coverage -std=c99 " compiler option option.jpg

linker option settings

Select C/C++ Build Setting and add "-fprofile-arcs -ftest-coverage -std=c99 " linker option linkoption.jpg

Rebuild your project.

run

Run the binary and executed lines and never executed lines are highlighted as can be seen in below screenshot. * Note: if the high lighted code does not show, you should select refresh project screenshot.jpg