BullseyeCoverage
The IAR integrated development environment cannot be configured to build using BullseyeCoverage. However, you can build from the command prompt using a makefile or script.
These steps show how to convert an IDE project to a script. Before enabling BullseyeCoverage, make sure the script successfully builds your project without BullseyeCoverage.
PATH
environment variable the IAR Systems common\bin
and arch\bin
directories.
For example:
set PATH=%PATH%;C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\common\bin set PATH=%PATH%;C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin
iarbuild
with -log all
to obtain a detailed log.
iarbuild project.ewp -build config -log all >log.txt
The config parameter is typically either Debug
or Release
.
Look at the project in the IAR IDE to determine this name.
grep
to extract these lines as shown below.
grep -F .exe log.txt >build.bat
build.bat
by quoting or shortening file names that contain spaces.
Use the directory separator forward slash /
rather than backslash \
to avoid escaping quotes.
For example, change
iccarm.exe C:\Program Files\IAR Systems\Embedded Workbench 8.4 Kickstart\arm\examples\Actel\CoreMP7\Blinky\blinky.c -o C:\Program Files\IAR Systems\Embedded Workbench 8.4 Kickstart\arm\examples\Actel\CoreMP7\Blinky\Debug RAM\Obj\ ...to:
iccarm.exe blinky.c -o "Debug RAM/Obj/" ...
Invoke build.bat
to verify you can build your project without BullseyeCoverage.
.\build.bat
Make sure the BullseyeCoverage/bin
is first in the PATH environment variable.
set PATH=%ProgramFiles%\BullseyeCoverage\bin;%PATH% cov01 -1 .\build.bat
By default, BullseyeCoverage automatically compiles the run-time library
run/libcov-iar.c
and adds the resulting object file to linker invocations.
This source implements the small footprint configuration.
You can override this behavior by one of the alternatives below.
--lib
libcov-
,
for example libcov-userDefined.a
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
The BullseyeCoverage run-time source file for IAR Systems,
BullseyeCoverage/run/libcov-iar.c
, uses the overridable low-level i/o functions.
If you do not have implementations of these low-level i/o functions, configure to run under the simulator.
If you need to run on real hardware,
see Embedded Systems.
After building your application using build.bat
, return to the IDE and start the debugger.
BullseyeCoverage run-time error messages are written to standard error.
After starting the debugger, use the command View Terminal I/O
so
that you can see any error messages that might occur.
Updated: 15 Aug 2023
Copyright © Bullseye Testing Technology. All Rights Reserved.