Getting Started Example

If you have not created the Framework libraries (and the FFS libraries when using CrossView Pro as a simulator), please do so.


Rhapsody in C

Please verify the implementation of your compiler bridgetarget bridge, and RTOS bridge, in particular the functions WSTTarget_Init() and WST_RTOS_Init().

NOTE This getting started documentation is mostly specific to the use of Heyden with an XC16x microcontroller and the Tasking compiler. Even if not officially supported, we deliver Heyden with sample makefiles for another EUROS environment in <your Rhapsody>\Share\WST_RXF_V5\<your product>\Samples\Code\i32. For details about using Heyden with other EUROS environments, please read Doc\Books\RXFPortingGuide.pdf

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 Heyden. Each RXF by Willert Software Tools comes with its own profile with the stereotype RXFComponent. RXFComponentsets the proper environment and some properies for the RXF. In products when the IDE is used to build your application, such a profile also defines some Tags which are used by a Deployer so it will use relative paths inside your IDE 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 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:




Note Each Rhapsody model must have a reference to the Heyden profile and use the stereotype RXFComponent. Heyden.sbs is installed in <Rhapsody>\Share\WST_RXF_V5\<product>\Config\Profiles\Heyden_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




Now you can build your application in the EUROS build environment.


EUROS Build Environment

After Rhapsody has generated the source files and also created the EUROS build file project.inc, you can build the application from your EUROS environment.

If you want to debug your application with Tasking's CrossView Simulator, you first need to create a board configuration directory called "XVsim" under <your EUROS installation directory>\target\board. An example board directory for the XVSim can be found under <your Rhapsody directory>\Share\WST_RXF_V5\HeydenDev\Config\Debugger\EUROS\XVsim. Just copy that folder to <your EUROS installation directory>\target\board and adapt it to your needs.

As EUROS sometimes has problems with paths incluing space characters and with too long paths, we first need to map the Rhapsody Share directory to another drive letter. The installation routine asks for the drive letter to use, but for this sample we are using drive letter R:.
Now the application should be built successfully and you can start debugging the application. Set a breakpoint in LED.c in the functions LED_off() and LED_on() and see how Blinky runs. Please not the LED_init(), LED_on() and LED_off() operations contain code to switch on the yellow LED available on the Infineon XC167 board. The LED will indicate the state of ActiveController.


Copyright (c) Willert Software Tools GmbH. All rights reserved.