Virtuoso Documentation


To understand what the Virtuoso Embedded Target Development Toolkit is and how it works, we start with the basics. Any C/C++ program consists ultimately of global variables, functions, and a thread entry point (or possibly multiple entry points for a multi-threaded application). This is shown below.

An embedded C/C++ application consists of embedded code running on a microprocessor that interacts with the outside world using peripheral component drivers. Virtuoso allows these interactions to be virtualized. To accomplish this, the Toolkit first exposes the variables, functions, and thread(s) of a C/C++ target application to a host application written in a higher level language such as C#, so that more powerful tools and capabilities are available for the target at runtime.

Let’s start with a very basic example. In the example below, a simple target application consists of two statically linked variables: int MyInt and float MyFloat, as well as the main entry point for the program. The foundational components that the Virtuoso framework provides are two classes, in this example written in C#: the Target Controller class (TargetController.cs) and the Target Model class (TargetModel.cs). The Target Controller is responsible for managing execution of the virtual target, and the Target Model is responsible for providing a run-time C# model of the target’s application-specific inner workings. In this example, we will use the framework to expose these two variables as properties of the Target Model. The setup is shown below.

With this setup, the C program simply compiles and links as normal. Virtuoso then provides TargetController.cs and TargetModel.cs classes ready to go for a C# host application. The Target Controller class is used to provide services that are independent of the target application itself, such as starting the application, stopping the application, and getting some generic application diagnostic information. The Target Model is used to interact with application-specific aspects of the target while it runs. So with this setup, we have a Target application, and a Host C#/.NET application. The host application has a Target Controller which controls the lifetime of the target application, and a target model, which manages the application-specific details of the target. The target application and the host application run in tandem.

While the host application is a C# application in this example, it is important to understand that Virtuoso is built to be extensible. The concept of the host application is the same regardless of what host platform or language is used, and the same is true for the target application. The specific host and target platforms are implemented as Virtuoso plug-ins. So if you preferred to create a host application for another host language or platform, like VB.NET, or Windows Phone, or iPad, or an Android phone, the concept of virtual device hosting is exactly the same. The particular platform you wish to use simply uses a different plug-in.

The same is true for the target. Whether your target is a Visual C virtual device project compiled in Visual Studio, or an embedded project compiled in MPLAB, Code Composer Studio, or any other microprocessor-specific IDE, the concepts are identical, with the implementation details of the specific target platform encapsulated by the plug-in. This makes the Virtuoso framework constantly extensible to new target platforms and host platforms as the demand for them arises.