Embedded UML Target Debugger Example

The Embedded UML Target Debugger is a product developed by Willert Software Tools GmbH. It allows you to analyze the software behavior on target. This is similar to a conventional high level language debugger, but on UML level. This page will guide you through the first steps how to use the Embedded UML Target Debugger.

To be able to work with the Embedded UML Target Debugger and view the target animation,  please create the Animation libraries and the Framework libraries first.

Basic Functionality - Getting Started with the Embedded UML Target Debugger

 For the first steps with our Embedded UML Target Debugger, it is recommended to use our example model instead of your own model. In this example we will use OORTXAnimationDemo.rpy, which is a good starting point for OORTX based frameworks. If you have an OXF framework, you may use RTOSAnimationDemo.rpy. The statecharts can give you a quick overview of what these simple models will do:


In your Rhapsody Model make sure to have the LiveAnimation stereotype selected in addition to the RXFComponent stereotype for your active component.


Make sure you have an empty GettingStarted IDE project you can deploy to. You can now perform a Generate/Make/Run in Rhapsody, which will deploy the files to your IDE, and build the GettingStarted example. After a successful build in your IDE, flash the executable to the target but do not start program execution yet. The target program must be reset and stopped. Otherwise the Embedded UML Target Debugger will miss important information about dynamically created objects the target sends.

Now start the Embedded UML Target Debugger on the PC. You can use the shortcut in the Windows Start menu to start the UML Target Debugger. It which launch the batchfile <Rhapsody>\Share\WST_RXF_V5\<your product>\Tools\TargetDebugger\Embedded_Uml_Target_Debugger.bat:
 


The Embedded UML Target Debugger first need to read the XML file which has been generated at the end of the build process in the IDE. This file is typically XMLData.xml which you can open using File | Open XML File or via button on the toolbar: 


After the XMLData.xml file was opened, you have to select the target communication plugin you want to use from the drop down list. In the next step you can select the communication parameters depending on the communication interface. This example works with a serial communication:







In retrospect it´s always possible to change the communication plugin and settings by using the toolbar buttons:





The Embedded UML Target Debugger also allows you to add your own I/O interface implementation.

Now it's time to shortly switch back to your IDE and start program execution on target, as the Embedded UML Target Debugger now listens for commands sent from target. In the tree view on the left you can now also see values of attributes, states and highwatermarks.
You will see something like this:




Advanced Features

Event Injection

Its also possible to inject events by the Embedded UML Target Debugger. This requires a right-click on the object to which the event will be sent. In the appearing context menu any event can be selected. So its possible to check out the reaction of the target, when the event is received by the object.



The Console window shows information on events: which object sends what event to which destination object. You can also click on an attribute: at that moment in runtime, the Embedded UML Target Debugger on the PC will query the target to send the actual value - such information is sent only on request by the PC in order to reduce the I/O traffic as much as possible. The information shown on events is actually transfered in a compact way and not as the strings you see, again to reduce traffic and thus runtime disturbance.

Filtering

On a larger model, showing all events and attributes is confusing, because it will not fit in a window and will lead to overhead. Therefore we have implemented a filter which can show information for 8 objects as maximum. Please select the Filter tab and enable a filter for the itsProxy1 object (Proxy's first instance). Afterwards the button on the toolbar to enable filter has to be pressed.



Now you can only see the events being sent by itsProxy. In the screenshot you see the first events are also coming from itsActivator1, but after the fifth event the filters have been enabled and only events from itsProxy1 are displayed.

You can always change which classes or instances should be animated, by checking and unchecking them in the tree view of your model in the Filters tab.To apply the changes, it is necessary to press the update filters button.

Timing Diagrams

The Embedded UML Target Debugger is able to switch from the default sequence diagram view to a timing diagram view. It is a useful diagram similar to the timing diagrams known from technical datasheets to visualize state changes proportional to the time axis.


The Timing Diagram functionality has recently be added and this part of the application still is a brand new feature with beta status. Especially the zooming functionality is very limited. This will be  improved in the near future.

Serial Communication Buffer Overflows

Interrupt based serial communication, e.g. available for the ARM Cortex M3 Keil environment, relies on send and receive buffers. When compiling the monitor libraries (CreateAnimationLibrary project), the buffer sizes and overflow behavior can be set via defines:
The best solution in such cases is to increase the value of SEND_BUFFER_SIZE in the monitor I/O file, e.g. WSTMonitorIO_Keil_CortexM3_UART.h, if the available RAM allows that.

More Information

To make it easier to navigate to your recent used XML files, you can select them in the file menu:


If you experience strange problems with the Embedded UML Target debugger, this could be caused by a non matching monitor version on target. To make it easily possible to detect such problems, the error log tab "Problems" will show Version conflicts in that case.

If you have any questions, please have a look at the Animation FAQ page or contact our support team.

You can also use TestConductor in combination with Animation.


Copyright (c) Willert Software Tools GmbH. All rights reserved.