Use this procedure:
1.Create a new MxVDev project using the following options:
•Start MxTransIt on Finish
2.In MxTransIt, type VMC in the Filter box at the top of the Toolbox on the left of the screen to find the Virtual Microcontroller Transform. Double-click to put it into the Harness window.
3.Click the Create VMC Visual Studio Solution verb at the bottom of the Properties box.
4.Click to select a folder for the VMC Visual Studio solution. Usually this is the project folder. The wizard creates a subfolder named SUT.
5.Select Configure VMC to automatically harness AUTOSAR Software Component(s) based on ARXML extract file(s).
Tip: To select multiple files, hold down Alt+Ctrl or Shift+Ctrl when you click .
The detected Software Components are automatically displayed. If the Transform is unable to detect these values, it usually indicates an unsupported version or invalid ARXML file.
10.Use the check boxes in the Software Components panel to select independent components for harnessing, or select the top-level box to select all. If necessary, click the Advanced button to open the Harness Properties box.
The system creates the following files in the \SUT\MSVC2010\MxVRTE subfolder of the project folder:
•Rte_<Source>.h (Application header file(s))
See AUTOSAR Features for more detail about these files.
12.If you are using the ReHarness verb, return to the ReHarness procedure. Otherwise, proceed to step 13.
13.Close MxVDev or disconnect the Harness.
In Visual Studio:
1.In the Solution Explorer, right-click on the project and select Properties from the context menu.
2.Source code files are added to the solution by the Create VMC Visual Studio Solution wizard. These are the files copied. If it is necessary to add additional files (for example, if files are in another folder), select Add->Existing Item to add the source (.c) files to the solution.
4.Be sure to disconnect the Harness in MxVDev.
5.Press F7 or use the Build command to build the solution. After a successful build, you can close Visual Studio.
1.Click the Connect/Reconnect verb to display the ports on the Transform.
2.Right-click on the Transform and select Export Ports.
3.Select the ports (Signals) that you wish to use for your testing in MxVDev.
4.Click to save the Harness.
1.Reconnect the Harness.
2.Import the Signals into the Signal Dictionary using the Connections dialog.
3.Use the Signals to create TestCases.
1.Click the ReHarness verb:
The Harness Regeneration form is displayed:
After you click OK, the Visual Studio solution is reloaded and displays the status shown below:
3.Click the Reload button to update the Visual Studio solution.
The Regenerate verb is used for automated harnessing (for example, with a VBScript). It bypasses the Create New Project dialog and harnesses the AUTOSAR project using properties specified in the COM interface.
For details, see Automated Testing (COM Interface).