Electronicdesign 26376 Promo Iar Vs Fig 1
Electronicdesign 26376 Promo Iar Vs Fig 1
Electronicdesign 26376 Promo Iar Vs Fig 1
Electronicdesign 26376 Promo Iar Vs Fig 1
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

Board-Mount DC/DC Converters in Medical Applications

March 27, 2024
AC/DC or board-mount DC/DC converters provide power for medical devices. This article explains why isolation might be needed and which safety standards apply.

Use Rugged Multiband Antennas to Solve the Mobile Connectivity Challenge

March 27, 2024
Selecting and using antennas for mobile applications requires attention to electrical, mechanical, and environmental characteristics: TE modules can help.

Out-of-the-box Cellular and Wi-Fi connectivity with AWS IoT ExpressLink

March 27, 2024
This demo shows how to enroll LTE-M and Wi-Fi evaluation boards with AWS IoT Core, set up a Connected Health Solution as well as AWS AT commands and AWS IoT ExpressLink security...

How to Quickly Leverage Bluetooth AoA and AoD for Indoor Logistics Tracking

March 27, 2024
Real-time asset tracking is an important aspect of Industry 4.0. Various technologies are available for deploying Real-Time Location.

Comments

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