MxVMC - The Virtual MicroController


The MxVMC (sometimes called VMC) is used when you want to simulate the behavior of a microcontroller on the PC.  It provides the following capabilities:

EEPROM emulation

Input and Output ports

A Scheduler and an OSEK operating system

CAN buses


The MxVMC runs C or C++ code. Visual Studio or GCC is required. You can use one or more VMCs in a project.

The MxVMC is a Transform, but unlike other Transforms, it runs as a independent process, so an issue in your source code cannot take down MxVDev.

The µC Library provides an interface for using the simulated microcontroller functions.

The VMC is the primary Transform used for SIL testing of C code. The interface between the software component and the VMC is called the Harness and is defined an AppIF.c code file. There are three ways to create an AppIF.c. In some cases, you may use a combination of these methods:

AUTOSAR - If your SWC is AUTOSAR-compliant and ARXML files are available, the VMC can automatically generate the Harness. See AUTOSAR Testing.

Guided Harnessing - Use the Guided Harnessing tool to select the Signals to use for testing the SWC.

Manually - The AppIF.c is a C code file and can be written or revised by a programmer. This may be the best way when working with an existing project or a non-standard interface. For details, see Port Registration.


Be sure the required software is available before starting an MxVMC project:

hmtoggle_plus1Visual Studio


In this Section:

Setting up your code

Using VMCs

Linking your code with the MxVMC

Harnessing Application Code for Testing

Guided Harnessing

Troubleshooting Guided Harnessing

Converting an Existing VMC Project

Guided Harnessing Demo

Port Registration (AppIF files)

Tips on Stubbing

Tips on Porting

Accessing the Scenario State

µC library



CAN Sub-System

DIO Sub-System

OSEK Library

Execution Model

Testing with the MxVMC

Debugging SUT Applications Using MxVDev and Visual C++

Debugging Access Violations and Other Memory Overruns

Handler Function Transforms

Visual Studio and MxSuite


Harnessing an AUTOSAR Software Component

Automated Testing (COM Interface)

AUTOSAR Reference


AUTOSAR Cruise Control Composition


Related Topics:


C Portability Guidelines

Token Charges