I am running my application on FPGA and I want to have code coverage report. I am able to know for each opcode in FPGA memory if it has been read or not and from this know the global code coverage and also per function when using the function addresses from the .ORC file. I would like to have a better view of which code is executed/not executed in each function. For this I need information correlating hex and src. There should be a way to obtain this from the tool-set since the simulator is offering such coverage function. Thanks in advance for your help.
The only way to show the Code Coverage information in uVision would be via a AGDI interface which requires a debug interface to your FPGA to read the code coverage information and to control the target processor (start, stop, read/write memory, set breakpoints etc.). See more details: http://www.keil.com/appnotes/docs/apnt_154.asp
If you want to create own tools which show the code coverage information mapped to the source files, you can get the information from the map file or the OMF file.
*.M51 / *.MAP File depending on BL51/LX51 linker:
------- PROC SAVE_MEASUREMENTS C:1A85H LINE# 63 C:1A85H LINE# 64 C:1AB1H LINE# 65 C:1ABDH LINE# 66 C:1AC7H LINE# 67 C:1AD9H LINE# 68 C:1AD9H LINE# 69 ------- ENDPROC SAVE_MEASUREMENTS
You can see the addresses in the code on the left hand side and the line numbers of the function 'save_measurement' on the right hand side.
You can get the original Intel OMF51 specification with this link: http://www.keil.com/support/docs/93.htm