Deferred initialization of Runtime Library
In some cases where runtime library during initialization needs to have some software/hardware components to be up and running and initialized prior to initialization. e.g.: RTOS.
By default: When collecting application level coverage, runtime library is being initialized as early as fist instrumented line of code is being executed. In order to NOT automatically initialize runtime you need to do the following:
1) Need to build runtime differently.
Add the CPPTEST_AUTO_INITIALIZATION=0 to the list of your macros during building runtime library:
$ make EXTRA_CFLAGS="-DCPPTEST_AUTO_INITIALIZATION=0"
2) need to add this trigger in code (e.g. right after OS_Init) to initialize parasoft runtime:
#include "cpptest.h" CppTest_InitializeRuntime()