Interfaces IDE
KEIL uVision
A ToolchainGateway bridge for the WSTDeployer supports adding RXF and generated files into a KEIL µVision project file.
The
implementation of this bridge is available in source code under
Tools\WSTDeployer\src\de\willert\deployer. This directory contains
three files which integrate the IDE with the WSTDeployer:
- ToolchainGateway.java: Implements the actual changes done in the IDE project file.
- Deployment.java: Inplements the
selection of RXF and generated files, copies them and passes the file
list on to the ToolchainGateway for µVision.
- Constants.java: Defines which properties will be read from WSTDeployer.properties
- WSTDeployer.properties.
Deployment to the uVision IDE
Please first read the General WSTDeployer Documentation to understand how tags in your model need to be set up and what will generally happen during deployment.
New files will be added to the "File"
section in the uVision .uv2 and .opt files which is specified as
component tag
within the UML model. The added files will not be added to a specific
folder in µVision and they will not be sorted by file types.
The best practice is to add an folder "Files" as the first one in the
µVision project and saving the project file before the deployment
is
started. All new files will then end up in that folder, also header
files. An exception if the use of GenerateDirectoryPerModelComponent, see below.
The µVision project file needs to be reloaded after each deployment.
The WSTDeployer for uVision also supports the following additional features:
Removing files from the uVision project
After model elements have been deleted, renamed or were taken out of
the component's scope, the WSTDeployer for uVision supports also
removing the orphaned files from the uVision project file. But e.g.
just renaming a class MyClass in Rhapsody into Controller will not trigger Rhapsody to delete the files MyClass.c and MyClass.h from the generated configuration folder. These two files will still exist there beside Controller.c and Controller.h. In this case the next WSTDeployer run will add Controller.c and Controller.h to the uVision project, but the files for MyClass will not be removed.
But there is an easy way to get Rhapsody to delete the orphaned files
from the generated configuration folder. In the Rhapsody Code menu select Clean Redundant Source Files. Confirm deletion of the files. It makes no difference if also RXF specific files like RxfConstants.h, RxfDimensions.h and WSTMemoryTypes.h will also be deleted, as they will be regenerated with the next Generate/Make/Run or Build. The deletion of the files will trigger Rhapsody to delete the orphaned / redundant files MyClass.c and MyClass.h from the generated configuration folder. When the WSTDeployer is started for the next time, it will also remove MyClass.c and MyClass.h from the deployment destination folder and remove the references inside the uVision project file.

CG:Package:GenerateDirectory and Subfolders
More complex Rhapspdy models often use the generation of source files
in a subfolder hierarchy. This can be controlled via the
property CG:Package:GenerateDirectory (or
CG::Configuration::GenerateDirectoryPerModelComponent in older Rhapsody
versions). After changing
the property you also have to perform the the Clean Redundant Source Files step from Rhapsody's Code menu. As an example project let's look at a modified Blinky model which we want to deploy into GettingStarted:
- Set property CG:Package:GenerateDirectory to TRUE.

- Add a subpackage of ExamplePkg, called SubPkg and move the object Controller into it.

- Use Rhapsody menu entry Clean Redundant Source Files and accept file deletions, if necessary.

- Edit the components tags relativeGeneratedFilePath from "." to "Generated" and relativeRxfPath from "." to "RXF".

- Close the uVision project to make sure uVision saves your changes before deployment.

- Perform a Generate/Make/Run in Rhapsody. The resulting generated file structure should look like this.

- The WSTDeployer copies files to the directories specified in tags and also used the subfolder hierarchy.

- In uVision re-open the GettingStarted project. The files will
come up this way, with one group per package but no sub-groups. Sub-groups are only visible via the naming of the Groups. The
first group ("RXF") contains references to RXF (dimension)
sources.

WSTDeployer for uVision specific Restrictions
- Before you deploy your code, make
sure you are not debugging in µVision or your project file might
get corrupted. If this ever happens, you should restore a backup of
.uvproj, see IDE Integration Backup section.
- If customized paths are selected, WSTDeployer will not add
files to a uVision project file. We recommend using the relative path
tags and the GenerateDirectory property to structure your code
generation and uVision project.
Copyright (c) Willert
Software Tools GmbH. All rights reserved.