Getting Started Example

If you have not created the Framework libraries already, 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().

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 Cornelius. 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 Code Composer 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:



The Deployer which will deploy Rhapsody generated source files and some generated configuration files, needs information from your model on relative paths inside a Code Composer project:



It uses Tags from the stereotype RXFComponent which you must specify for your Component:

Note Each Rhapsody model must have a reference to the Cornelius 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. Cornelius.sbs is installed in <Rhapsody>\Share\WST_RXF_V5\<product>\Config\Profiles\Cornelius_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 deploy the generated files. The model does not contain the location of your GettingStarted Code Composer 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 Texas Instruments toolchain on various PCs may differ.


Deployer

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.pjt 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 Code Composer project:






TI Code Composer IDE

Now open Code Composer. If the Parallel Debug Manager is not shown, select View | Parallel Debug Manager in the IDE. If you need to add the CPU for the eZdsp TMS320 F28335 board, use File | Launch Setup in the Parallel Debug Manager to add F28335_eZdsp.

Connect to the eZdsp TMS320F28335 board:



Open the the GettingStarted project in CodeComposer, which is installed in the directory <your Rhapsody>\Share\WST_RXF_V5\<your  product>\Samples\Model\Code\GettingStated.




Use File | Load Program to download the image GettingStarted.out onto the board so you can debug the sample application:




When you test it in the debugger, set breakpoints in LED.c to verify the working:



The tasks TSK_Main and TSK_idle are statically defined in the configuration file GettingStarted.TCF; the tasks ActiveController and BridgeTask are created dynamically by the Framework.


Note 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 Code Composer project in case you want to use a different Code Composer project for your Rhapsody project, or in case you moved the Code Composer project. 


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