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:
•Input and Output ports
•A Scheduler and an OSEK operating system
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:
•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:
You must use a supported version of Microsoft Visual Studio. For a complete list, see:
MxSuite 3.42 or higher is required to use a GCC compiler with your SUT.
Install the MSYS2 package:
1.Download and install the MSYS2 from https://www.msys2.org. It is best to use the default installation directory so all users may update the packages. The recommended package to download is the 64-bit version.
2.Select Start Menu->MSYS2 64bit->MSYS2 MinGW32 to start an MSYS2 MINGW32 command prompt.
3.Install the 32-bit compiler using this command:
pacman -S --needed base-devel mingw-w64-i686-toolchain
4.Press the enter key to use the default option (all).
5.Be sure the installation completes successfully.
To ensure there are no spaces in the command line, we strongly recommend that you use the template provided in the Templates subfolder of the MxSuite installation folder.
MxVDev supplies the environment variable MxVDefaultPath to the build system when running make. This variable is also set by the Set as Current Version menu option.
1.Utilizing your make system, add AppIF.c to your Make system.
2.Add a build command and a clean command to the Makefile system to include the AppIF.c object file.
3.Ensure that the linker is linking with MxRTEHarness MxRTERuntime
4.Ensure that the file being output is named properly.
In this Section:
➢Port Registration (AppIF files)
➢Testing with the MxVMC