Often times, for various reasons, it seems preferable to collect source coverage analysis data on the host – i.e. on some hardware platform that is not the final hardware platform. As far as this author is concerned, it sounds like a reasonable thing. Here’s what you’ll need to ensure:
1. Make sure your pre-processor settings are the same.
You don’t want to be running source coverage analysis on different sources. Now, there will undoubtedly be code (at the very highest and lowest levels) that will be different – the typical #ifdef WINDOWS and #ifdef TARGET_OS type flags. That stuff may need to be analyzed manually. But otherwise: keep your preproc settings the same.
2. Confirm that the results of the functional tests run for SCA are identical to the results when those tests are run on the target.
To get SCA, you have to run requirements-based functional tests. Those functional tests should run with identical results between the target and the host. If they do, you will have confirmed (by inference) that you have achieved complete coverage on the target, you just haven’t measured it.
If you keep these two goals in mind, host-based SCA should be sufficient to comply with DO-178B objectives and should be much more efficient than doing full measurement and analysis on the target.