IAR Information Center

GETTING STARTED

GETTING STARTED

USER GUIDES

USER GUIDES

TUTORIALS

TUTORIALS

SUPPORT

SUPPORT

RELEASE NOTES

RELEASE NOTES

EXAMPLE PROJECTS

The visualSTATE product package comes with a number of different example designs and sample applications, as well as reusable code examples for things like events queues and using the visualSTATE API. This page provides a brief overview and description of each example as well as pointers to example-specific documentation. The examples are divided into these sections:

The Examples

A CD player example

This is an example model showing a simplified CD player. The example is available in two versions:

A CD player example with Altia Design prototyping support


This is the same example as the second example above, but it is augmented with a prototype 'front panel' that emulates the user interface of a car CD player that can be manipulated on-screen to exercise the state machine model, including graphically inserting and ejecting the compact disc! The front panel is created with Altia Design. Such a front panel design can optionally be code generated for virtually any LCD based embedded system. The example uses a free Altia run-time engine that lets you run the example, but not modify the front panel design. If you want to try the full Altia tool suit, you can visit Altia's web site to get your own evaluation version of the toolset.
The example files can be found here and example-specific documentation can be found here. You can open the workspace in the visualSTATE Navigator.

A mobile phone call control design

This example is a very simplified handset design that shows how call control can be implemented as a graphical state machine. The example files can be found here. You can open the workspace in the visualSTATE Navigator.

Board support and example applications for specific hardware

Currently there are twelve board-specific applications serving as both example applications and as board support packages showing how the visualSTATE API can be used on specific hardware. The examples show how for instance interrupts from peripherals like buttons and timers can be fed as events to a state machine design in an easy manner.
All these examples are created for specific hardware and specific versions of IAR Embedded Workbench, but by examining the code, code idioms can easily be reused. Especially the main-loop code and event queue code is very similar for all examples.
All hardware examples also show how the C-SPYLink plug-in enables true graphical state machine debugging.
For each example a link is provided to the example documentation and it is noted if the example has any special properties.

Using the C++ API

This is an example that shows how to use the C++ code generation feature for table-based code. The example is generic and only requires a C++ compiler to build. The source files are accompanied by a build project for IAR Embedded Workbench for ARM version 5.xx, but are completely hardware-independent. The example also shows how some of the additional API functions like SEM_name() can be used. An application note in PDF format describes the example and also discusses some additional features of the C++ version of the API.
Documentation
You can open the workspace in the visualSTATE Navigator.

Hardware-independent example code

This is a collection of more or less hardware-independent source files and sample models.