0

Is there any way to integrate EDK2 based application to come into Bulls Eye Code Coverage tool? The executable will be having .efi extension, and it open's only in EFI shell. I believe, i also need to develop an driver to capture the coverage data into external disk for analysis, as the application will be valid only in the EFI Shell(BIOS).

So, does anyone have any idea, on how it can be done, for overall EFI Applications?

Thanks, Pramod

pramod
  • 19
  • 3

2 Answers2

1

These are the steps I took to integrate Bullseye into EDK2 (after installing Bullseye following the instruction on the website):

  1. Use the /run/libcov-printf.c and replace the "printf" with "AsciiPrint".
  2. Copy all the files from /run/ to your EDK $WORKSPACE
  3. Create library .inf file and add libcov-printf.c to its [Source] section
  4. Add library instance to your platform .dsc file (MdeModulePkg.dsc probably)
  5. Add library reference to your application .inf file under [LibraryClass]
  6. Add cov_dumpData() in your application source code (usually at its exit point).
  7. compile using EDK2 build

You'll end up with an efi binary that you can run on your target and get the measurements once the application reaches its exit point. The output data can be redirected to a file (using the > directive inside EDK2 shell) and then be processed by covpost to be merged into the cov file created in the build process.

ariz
  • 11
  • 1
0

Well I don't know how EFI works. However bullseye coverage support the customization. When I worked for the embedded system. I created open/read/write functions to write the coverage data not to the file but to the serial cable and I created the host application to interprete the data sent from serial cable and save them into cov file. I'm not sure if this works on your case well. However you can start from the following link. http://www.bullseye.com/help/env-embedded.html

JunHo Yoon
  • 41
  • 4