The following components are provided to facilitate testing IAR Embedded Workbench projects:
There are more Test Configurations mentioned in toolchain-specific sections. These are configured manually and intended only as a backup solution when EW-generated C-SPY batch script isn't available or in other problematic cases. Please use the aforementioned "Batch Template" Test Configurations whenever possible.
Standard test configurations, such as "Generate Unit Tests", "Generate Stubs", etc., can also be used for IAR projects and are recommended to help ensure code quality.
Starting with C++test 9.1, extensive changes have been applied to support environments where multiple IAR EW installations co-exist. The information about which IAR version/installation to use is crucial for enabling C++test to correctly build and test your projects. IAR does not recommend using internal project data to obtain information about IAR version/installation, so it must be deduced by from the IAR Windows registry entries and other primary information, such as EW_DIR or PATH environment variable values. We strongly recommend setting the EW_DIR variable to the EW installation folder path and allow the other method to operate as a C++test backup mechanism. C++test uses these versioning methods both when importing projects and when scanning '.ewp' project files. With each method and environment setting, C++test will check the availability of chosen/deduced EW installation in the registry; if it is not properly registered, C++test will not be able to work with it. During a single session (application run), C++test can work with only the single chosen EW version/installation. To change this, you need to restart C++test with the modified environment. |
IAR extensions related to IAR memory attributes (e.g. ’__data’, ’__data20’, ’__tiny’, ’__near_func’) are not fully supported. This limitation may lead to errors during analysis, such as parse errors or instrumented code compilation errors. The limitation may also lead to code being analyzed as if it contained memory attributes different than the attributes in the original code.
void f(int __data16 *)
and void f(int __data24 *)
functions may be displayed as coverage for two different function with the same void f(int *)
signature. -e
compiler option to C++test compiler options for the project:-e
in the Compiler options field and click Apply.gui.properties
file, locate the line that begins with cppCompilerCmdLine=
and change the --eec++
compiler option to the required option. This line may have the following appearance:cppCompilerCmdLine=$(exe) $(filtered_opts) --eec++
-I $(CPPTEST_INCLUDE_DIR) $(input) -o $(output)
gui.properties
file contains a line that begins with cppCompilationModeOption=
, then you must also change the --eec++
compiler option to the required option. This line may have the following appearance:сppCompilationModeOption=--eec++
cpp.psrc
file:Locate the lines that begin with edgtk.preprocessorCommand
and edgtk.gccAutoconfiguratorCommand
and change the --eec++
compiler option to the required option. The lines may have the following appearance:edgtk.preprocessorCommand {exe} --preprocess=nl {out} {opts} --eec++ {in}
edgtk.gccAutoconfiguratorCommand {exe} --preprocess=nl {tmpout} {opts} --eec++ --silent --predef_macros {out} {in}
inline
or function_effects
) used inside compiler header files may be printed to the C++test console. In most cases, these warnings indicate that the optimization level of tested code is different than the optimization level of the same code in the original project and can be ignored.bin
or inc
) from a compiler installation directory and treat them as linked folders. As a result, your analysis scope may contain additional files, which may lead to performance issues and unexpected messages in the C++test console. Remove the unwanted linked folders from the C++test project to avoid these issues. You can also prevent C++test from selecting additional directories when creating a new project from a .bdf file. For example, in the GUI: