IAR Visual State can generate code using the Java language.
The Visual State project is set to generate C code (with C-SPY Link support) by default.
- Go to Project → Options → Code generation... (Alt+F9).
- In the Configuration tab, de-select Generate for C-SPYLink and, instead, select Java code generation.
- Press
OK
to close the window. - Go to Project → Code generate (F9).
Note The generated code can be found on the local repository root directory, under the
VS_coder
folder.
Launch
a new workspace located on the repository's root directory (/path/to/visual-state-demo
).- Go to File → Import → General → Existing projects into Workspace.
Browse
to select thevisual-state-demo
folder as root directory.- Make sure the VisualState_Demo project is selected and
Finish
. - Close the Eclipse Welcome Screen and, in the Package Explorer select the VisualState_Demo project.
- In the main menu, select Run → Run as... → Java Application (Alt+Shift+X,J).