Use the AUTOSAR Cruise Control sample to demonstrate automatic harnessing of an AUTOSAR SWC. For more detail about the SWCs, see AUTOSAR Cruise Control Composition.

1.In MxVDev, select Help->Copy Samples to copy the project files to the sample folder (default: MxSuiteSamples). See Sample Projects Overview.

2.Open the MxVDev project in the VMCCruiseControl subfolder.

3.Disconnect the Harness.

4.Open MxTransIt, then use the Toolbox to create an MxVMC Transform.

Note: The purpose of this sample is to demonstrate creating and harnessing an MxVMC. If there is already an MxVMC present, delete it, and create a new one before proceeding.

5.Click the Create VMC Visual Studio Solution verb at the bottom of the Properties box.

MV-newproject-marked

6.Click 3dots_button to select the project folder. The wizard creates a subfolder named SUT for the VMC Visual Studio solution.

AutoSAR-New-Project

7.Select Configure VMC to automatically harness AUTOSAR Software Components based on ARXML extract files.

8.Click the Add button and browse to select the ARXML files in the ARXML subfolder of the sample folder (\AUTOSARCruiseControl\SourceCodeAndArxmls\ARXML).
 
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.

9.Click OK.
 
The system creates the following files in the SUT\MSVC2010\MxVHarness subfolder in the project folder:

AppIF.c

MxVAutosarHarness.c

MxVAutosarHarness.h

MxVOSKEOS.c

MxVOSEKOS.h

The system creates the following files in the SUT folder at \SUT\MSVC2010\MxVRTE

Rte.c

Rte.h

Rte_Main.h

MemMap.h

Compiler.h

Compiler_Cfg.h

Std_Types.h

Platform_Types.h

Rte_CruiseCntrlAlg.h

Rte_DrvForceCal.h

Rte_VehComponent.h

10.Copy the Software Component source files (all the files) from the \AUTOSARCruiseControl\SourceCodeAndArxmls\SourceCode subfolder in the sample folder to the \VMCCruiseControl\SUT\MSVC2010\SourceCode subfolder.

Note: Because all the source files are in one folder, it is not necessary to set up the Include directories.

11.In Visual Studio, select Add->Existing Item and select all the source files from the \SUT\MSVC2010\SourceCode folder.

AutoSAR-add-marked

12.Be sure the Harness is disconnected.

13.Press F6 or use the Build command to build the solution. After a successful build, you can close Visual Studio.

14.In MxTransIt,  click on the VMC Transform, then click the Connect/Reconnect verb to display the ports.

15.Right-click on the Transform and select Export Ports.

AutoSAR-export

16.Select all the ports (Signals). Click Save to save the Harness.

17.Close MxTransIt.

18.In MxVDev, connect the Signals.

19.Run the LetsRide.mxs scenario.

autosar-lets-ride

 

Related Topics:

AUTOSAR Testing

AUTOSAR Cruise Control Composition

Sample Projects Overview