Creating a C++test Project from an EWARM Project
- Choose File> New> Project and select Import IAR Embedded Workbench projects.
- Click Next and type (or browse to) the path to appropriate project/workspace file or directory.
- Click the Refresh button and select projects to import.
- Click Next and set the import destination, project contents and build configuration to use.
- Click Finish.
Creating a C++test Project from Other EW Project Types
C++test's built-in GUI-based EW project importer only supports EWARM projects, and only for specific EWARM versions (see Support Overview). Importing EW projects for other toolchain versions or target architectures must be done with the
cpptesttrace utility. The
cpptesttrace utility scans the command lines for processes spawned by the
The importing process consists of two stages: 1) Generating the Build Data File (.bdf) and 2) importing this file in C++test.
Generating .bdf file from an EW project
- For runtime testing, increase "Stack/Heap" in EW project options to at least 2048(800h)/ 1280(500h) respectively to allow for testing overheads. For EW430 projects that use the 430X core and medium or large data model, the values should be at least 4096(1000h) for stack and 2048(800h)/4096(1000h) for the heaps.
- Start console.
- Set the compiler toolchain on PATH (as for C++test; 'cspybat' on PATH & EW_DIR envar aren't needed).
- Set the C++test install directory on PATH.
- CD to the project's directory.
- Run the following command:
Use an EW project configuration name (e.g.,
DebugRunFromFlash, etc.) for the
Specify the absolute path to the
--cpptesttraceOutputFile option. This is because several .bdf files are likely to spread through working directories spawned by
iarbuild toolchain commands.
You may need to place quotation marks around the options containing spaces/braces.
In most circumstances, you should name your C++test project after the .ewp file name when using the
By default, the trace feature is configured to capture each toolchain executable name recognized by C++test through built-in compiler configurations. If the process' command-lines aren't scanned, specify the compiler and linker executable names by adding a
--cpptesttraceTraceCommand option to the
cpptesttrace command always appends its output file, so you should remove the previous .bdf file before re-scanning the project.
You may also use
-log all after the
-build flag to show detailed build progress information. The
-log all option is an
Import BDF file into C++test
- Start console (or reuse this for BDF generation).
- Set environment for the appropriate toolchain as described in the documentation (executables on PATH, EW_DIR envar).
- Start C++test.
- Follow steps of importing the BDF file described in documentation (see ).
- Confirm project settings correctness in Properties> Parasoft> C++test> Build Settings.
You must repeat the entire process following any changes to the original project unless you are adding new sources in existing source locations.