Getting Started
Example
If you have not created
the Framework libraries and the CMX-RTX libraries already, please do so.
Rhapsody in C
Please verify the implementation of your compiler bridge, target bridge, and RTOS bridge,
in particular the function WSTRTOS_Init().
The CMX-RTX function K_OS_Tick_Update() must be called peridically,
so either during board initialization within startup code, or within
WSTRTOS_Init() you must use a Interrupt Service Routine like t4_handler() to provide a heartbeat for CMX-RTX.
Open the Rhapsody project Blinky at the directory <your
Rhapsody>\Share\WST_RXF_V5\<your product>\Samples\Model\Blinky:

TargetComponent
is using the stereotype RXFComponent which is defined in the profile Offenbach. Each RXF by Willert Software Tools comes with its own profile with the stereotype RXFComponent. RXFComponent
sets the proper environment, some properies for the RXF and defines
some Tags. These Tags are used by the Deployer so it will use relative
paths inside your Keil uVision project. The other profile referenced, WSTProfile, is used to set Rhapsody GUI details which makes it easier for you to view and maintain your models.
ExamplePkg, show the classes: SequentialController, ActiveController and LED:
- the class ActiveController is used to create an active object, which runs in its own task.
- the class SequentialController will be instantiated once, and run in the so-called main task.
- the LED class will result in two objects, one running in the main task, one running in the SequentialController task.
The Rhapsody generated code from the ActiveController object results in a timer event, which is sent to the LED every 400 msec. The SequentialController object uses the LED_on() and LED_off() operations to switch another LED on and off, every 300 msec.
Select the proper environment via the Features and
do this for both
Configurations Debug and Release:
The Deployer which will deploy
Rhapsody generated source
files and some
generated configuration files, needs information from your model on
relative paths inside a Keil uVision project:

It uses
Tags from the stereotype RXFComponent
which you must specify for your Component:
- the Tag relativeGeneratedFilePath
defines the path inside the Keil uVision project to deploy Rhapsody
model generated files to
- the Tag relativeRxfPath
defines the path inside the Keil uVision project to deploy
framework files to
- the Tag toolchainProjectFile
defines the name of the Keil uVision project file to update
(the
deployed files must be added to the project). Set it to GettingStarted.uv2. The
WSTDeployer will also modify the related .opt project options file
automatically.
- the Tag rootDescription
will be is displayed in the WSTDeployer GUI. It is a short
text to inform developers working on the model, to what kind of
build environment the model should be deployed. It can also include a
non machine dependent hint, where the Keil uVision project's
root
directory can be
found.
- the Tag rootTitle
is also displayed in the WSTDeployer GUI. It is a short title
for the Keil uVision project's machine specific
root path.
| Note |
Each Rhapsody model must have a reference to the Offenbach profile and
use the stereotype RXFComponent.
This will allow you to use the Tags.
You can set them via the Features dialog for your component. Offenbach.sbs is installed in
<Rhapsody>\Share\WST_RXF_V5\<product>\Config\Profiles\Offenbach_Profile_rpy |
Use Code
| Generate
Debug to generate C code from this model, and accept the
question to have the directory created for the Debug Configuration:

Use Code | Build
TargetComponent.dat to generate
- the file RhapsodyRun.bat to launch the deployer
later on.
- the file RxfDimensions.h
which is an include file which contains constants which are derived
from properties set in the Rhapsody model like like QUEUE_INCREMENT_SIZE and RIC_MAX_TM.
These all deal with dimensions for the RXF, and because these are
inserted in an include file you do not need to set these constants in
your Embedded Workbench later.
- the file RxfConstants.h
which sets constants with respect to the version of the RXF and
Rhapsody and sets _DEBUG,
WST_HIGHWATERMARKS
and NO_MALLOC
used in a Debug configuration or Buildset.
- the
file WSTMemoryTypes.h which is used for Memory Section Management
so you can locate code and data exact where you like it.

Now you can deploy the generated files. The model does not
contain the
location of your GettingStarted Keil uVision project on your PC; the
Deployer will maintain
that information instead. This enables one to have the same project
used by different persons at different locations; the installation of
the Keil toolchain on various PCs may differ.
Deployer
Before you deploy your code, make
sure you are not debugging in µVision or your project file will
be corrupted. We are working on this Known Issue #1180.
The very first time that the Deployer must deploy a project, it will
automatically launch in configuration mode and ask for path(s). Select
Code | Run
TargetComponent.dat to start the Deployer:

The Deployer will prompt for the path to your GettingStarted workspace
or project, so you must specify
Rhapsody\Share\WST_RXF_V5\<your product>\Samples\Code\GettingStarted:

The Deployer knows from your model that it must search for
a GettingStarted.uv2
project file in that directory, which it will update with the names of
the files it deploys:

After you saved the path to GettingStarted, the files are deployed to
the Keil uVision project:

Keil uVision IDE
Now open the GettingStarted
project in Keil uVision, which is installed in the directory
<your Rhapsody>\Share\WST_RXF_V5\<your
product>\Samples\Model\Code\GettingStated:

Now we can build the application and test it.
| NOTES |
The configuration of CMX-RTX must match
your Rhapsody model. The configuration of CMX-RTX is done via the
include file cxconfig.h which defines the number of tasks, mail boxes
etc.
We provided an example of cxconfig.h in <your Rhapsody>\Share\WST_RXF_V5\<your product>\Source
|
|
You must add an entry in the Rhapsody Tools menu, which launces the Deployer in Configuration Mode.
This
allows you to change the path used by the Deployer for your µVision
project in case you want to use a different µVision project for your
Rhapsody project, or in case you moved the µVision project.
|
This product is suitable for any C16x/XC16x/ST10 CPU supported by the Keil toolchain.
Please refer to the Migration Guide
if you were using a XC16x specific Framework of an earlier version: we
no longer release different products for C16x versus XC16x thanks to
the new Bridges. The implementation of CMX-RTX is different for C16x versus XC16x CPUs.
Copyright
(c) Willert
Software Tools GmbH. All rights reserved.