BullseyeCoverage Up Contents Search

Cadence Xtensa Xplorer

The Xtensa Xplorer Development Environment cannot be configured to build using BullseyeCoverage. You can build with BullseyeCoverage using the command line compiler.

Convert Project to Script

  1. In Xplorer, rebuild your project and copy the compiler commands from the Console window. For example:

    Xtensa Xplorer

  2. Paste the commands into a text editor. Remove all the lines other than invocations of the compiler. Remove the directory prefix from these commands. Save the file as build.bat. For example:

    xt-clang -c -g -O0 -fmessage-length=0 -DPROC_hifi3_ss_spfpu_7 -DCONFIG_hifi3_ss_spfpu_7 --xtensa-system=C:/usr/xtensa/XtDevTools/install/builds/RI-2021.8-win32/hifi3_ss_spfpu_7/config --xtensa-core=hifi3_ss_spfpu_7 --xtensa-params= "\"C:/Users/test/workspace/HelloWorld/main.c\"" -o "\"C:/Users/test/workspace/HelloWorld/bin/hifi3_ss_spfpu_7/Debug/main.o\"" 
    
    xt-clang++ -Wl,@C:/Users/test/workspace/HelloWorld/bin/hifi3_ss_spfpu_7/Debug/objfiles.list -o C:/Users/test/workspace/HelloWorld/bin/hifi3_ss_spfpu_7/Debug/HelloWorld.minsize -mlsp=sim -Wl,-r -nostdlib --xtensa-system=C:/usr/xtensa/XtDevTools/install/builds/RI-2021.8-win32/hifi3_ss_spfpu_7/config --xtensa-core=hifi3_ss_spfpu_7 --xtensa-params= 
    
  3. Invoke a command shell with the environment variables set properly to invoke the Xtensa compiler for your project.

  4. Enable coverage build and run the script to instrument your project.
    C:\project\> set PATH=%ProgramFiles%\BullseyeCoverage\bin;%PATH%
    C:\project\> cov01 -1
    C:\project\> build.bat
    

Run-Time Library Built Automatically

By default, BullseyeCoverage automatically compiles and adds the run-time library run/libcov-xtensa.c to compiler invocations that link an executable. This source implements the small footprint configuration for running under the Xtensa instruction set simulator. You can override this behavior by one of the alternatives below.

Saving Coverage

Add a call to cov_dumpData into your program. The output file BullseyeCoverage.data-1 is written in the project directory.

#if _BullseyeCoverage
	cov_dumpData();
#endif

Updated: 14 Jun 2023