Home > User Support > CoverageMaster winAMS FAQ

CoverageMaster winAMS FAQ

Coverage Measurement

013_05: When using the hook code feature to perform coverage tests, the compiled object file size exceeds the ROM size of MPU. How can I solve it?

Question:

For MC/DC, C0, C1 coverage measurement I am using the hook code feature to perform coverage tests, but the compiled object file size exceeds beyond the MPU ROM size. How can I solve it?

Answer:

Use the following methods as a workaround.

1. Reduce the number of source files to insert hook code into.

The hook code object file build can be reduced by selecting only the source files needed for the test. This reduced the size of the object code.

In CasePlayer2 choose Project menu -> Setup object file with hook code -> Hook Code Settings tab. Select only the required source files that contain functions to be tested on the "Select Source Files to Insert Hook Code into" section (see figure below).

2. Create the object file using the "Use Compact Hook Code" feature.

CoverageMaster V3.6 and later versions included the "Use Compact Hook Code" feature to reduce the size of the hook code object. The size that can be reduced depends on the MPU and target compiler.

By using this option, the hook code object file size is reduced by reducing the redundancy of the hook code.

3. Compile the hook code object by selecting another MPU that has the same core and a larger ROM size.

If another MPU that has the same core and a larger ROM size is available, the object with hook code can be loaded into ROM. When using the hook code measurement feature, coverage information will be obtained from the logical process of the hook code inserted object so the MPU selection will not affect the coverage results.

Leave the compiler settings for the target object build as is, then select another MPU model with a larger ROM size only for the object with hook code build.

Since the evaluation of output variable values after test execution is obtained from the target object test (not the object with hook code), there is no effect on unit test results other than coverage measurement.

4. If the ROM size is still exceeded even when using the above workarounds, adjust the object.

If the ROM size of the object code is exceeded even if only one source file is selected for inserting hook code into, remove objects not related to the test from being linked, etc. to reduce the size of the object. There is no other workaround.



Related Technical Tips Search

Other technical tips in GAIO's web site can be searched for using the links below.

Search key word link: Hook Code | ROM size
Technical Tips Google Search

 

Information Links