

Instrument = Instrument source files from given folders Ignore *.c = Ignores all C source files from instrumentation Edit nfig in the RKTracer installation folder and go to the end of the file add the following information.
#Iar embedded workbench for arm trial code#
Suppose you need code coverage for source files from three different folders, i.e., core, keys, power, and ignore coverage for folders firmware_loader and lockdown.
/https://assets.v3.snowfirehub.com/images/120985/312_o_iar.png)
Generate coverage reports for the selected foldersĬ:\project\sound\drivers\base\power\firmware_loader\ Code Coverage Reports generation Code Coverage Reports Enable coverage for selected files You can manually open the HTML report using index.html. The RKTracer tool will internally convert the “RK_MEM.raw” data file to “rk-coverage.txt” and map with JSON files (generated during instrumentation) in the rktracer folder and generate the HTML reports.

Go to –> Tools menu –> RKTracer Report to generate Html reports. We will provide customized script to transfer coverage data from embedded target to host machine. If embedded target is not connected to host ,then contact support. So that when line number 84 (where we have set a breakpoint) executes at runtime, the RKTracer tool will save the coverage data to the “RK-MEM.raw” file in project working directory(while testing on embedded target, make sure you connected to host machine) . Rkdump() Breakpoint set to save coverage at runtime You need to first connect to the embedded target before running the tests, set the breakpoint, and then right-click edit the breakpoint as shown in the screenshot and add. We can also save coverage data automatically when a certain source code line is executed. Then the rktracer tool automatically saves coverage data to the application working directory when you terminate the debug process i.e after running the test cases in the embedded target. If you have connected the embedded target to the host machine at the time of running tests. RKTracer Code Coverage Tool Enabled Rebuild application and run tests When you enable the RKTracer Tool for the first time, you might get a popup to grant read/write permission for the IAR Embedded workbench IDE installation folder. At least once you need to build and test the application in embedded target in debug mode and restart the IDE. Prerequisites: Once you have successfully integrated the RKTracer tool.
