BullseyeCoverage Up Contents Search

Green Hills MULTI

The Green Hills MULTI IDE cannot be configured to build using BullseyeCoverage. However, you can build MULTI projects from a command prompt with a script as described below.

Build Project with a Script

  1. Add the BullseyeCoverage/bin directory and the Green Hills compiler directory to the PATH environment variable. For example:
    set PATH=%PATH%;%ProgramFiles%\BullseyeCoverage\bin;c:\ghs\comp_201854
    
  2. Use the Green Hills gbuild program to generate a script from your MULTI project as shown below.
    cd projectDirectory
    gbuild -allinfo -commands -unix >build.sh
    

  3. Modify build.sh so that it invokes the compiler without an absolute path when building your project files. Do not make this change for system and library source files such as crt0.c and others in tgt/libstartup and tgt/libsys. For example, remove the lined-through text below:
    C:/ghs/comp_201211/cxv850 -c -MD -bsp generic -G -object_dir=objs \
    
  4. Modify build.sh to change all the directory separators from backslash \ to forward slash /. For example:
    -filetype.c src_hello/hello.c -o objs/hello/hello.o
    
  5. Run the script. If you are working on Windows, use a Unix-style shell to run this script, such as bash from Cygwin or MSYS2 .
    cov01 -1
    bash -e build.sh
    

Run-Time Library

If you are using the INTEGRITY RTOS, BullseyeCoverage automatically adds the run-time library BullseyeCoverage/run/libcov-greenHills-integrity.c to your project. This source implements the small footprint configuration. For other platforms, see Embedded Systems.

Saving Coverage

Add a call to cov_dumpData into your program. The run-time BullseyeCoverage/run/libcov-greenHills-integrity.c attempts to write the output file BullseyeCoverage.data-pid first with host I/O (hostio_open) and if that fails, then to the native file system.

#if _BullseyeCoverage
    cov_dumpData();
#endif

Updated: 26 Jan 2021