Electronicdesign 26376 Promo Iar Vs Fig 1

State-Machine Tool Now Generates C# and Java Code

April 5, 2019
IAR’s Visual State, which graphically constructs state-machine models, adds C# and Java code to its C and C++ repertoire.

To describe parts of embedded systems, designers will frequently use state machines, and that often means leveraging modeling tools like UML. These models are sometimes part of the certification process for safety-related applications. Turning these models into code can be challenging, especially if one needs to keep the model in sync with the code.

IAR’s Visual State (Fig. 1) allows designers to graphically construct state-machine models using the Visual State Designer. The hierarchical IAR models are compatible with the UML standard.

1. IAR’s Visual State allows designers to graphically create state machines and then turn models into C, C++, C#, or Java code.

Models can then be turned into C, C++, C#, or Java source code using the Visual State Coder tool. C# and Java are new additions. Changes made to the model can be easily turned into source code, allowing an application to be created from the latest model.

Visual State would be useful just for its ability to create source code, but it includes other handy features. The Validator, a state-machine simulation tool, allows a model to be tested regardless of what code will eventually be generated. The Verificator tool provides formal system verification. It can check for errors like state dead ends, ambiguous assignments, and unused elements.

For example, the Documenter tool is used to generate documentation reports in HTML or RTF formats. It correlates information from the Validator, Verificator, and Coder tools.

Visual State will work with any toolset since it generates source code, but it’s integrated with IAR’s own Embedded Workbench IDE (Fig. 2). A similar workflow would be used with any other toolset. The advantage of using IAR’s IDE comes when debugging and application. It supports state-machine breakpoints.

2. Visual State is integrated with IAR Embedded Workbench IDE.

IAR’s IDE also supports MISRA C/C++ compliance. Visual State includes an option to support the standard, addressing details such as avoiding embedding assignments in subexpressions.

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!