RTSC+CCStudio v4 QuickStart

From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 21-Apr-2014 09:04 UTC 

RTSC+CCStudio v4 QuickStart

Using CCStudio v4.2 to create, build, and debug RTSC projects


This page provides quick instructions for creating, building, and debugging a project that uses RTSC within an Eclipse IDE such as Code Composer Studio v4.2. If you don't have CCSv4.2 or prefer to use the the XDCtools command line tools directly, see Using XDCtools Commands.

This page uses XDCtools 3.20. The steps are different if you are using XDCtools 3.16.

Contents

Creating CCSv4 projects that use RTSC

Follow these steps to use CCSv4.2 to create a project that can use RTSC. You can also watch a demo that shows most of the steps in this page.

  1. Open CCS and choose File > New > CCS Project from the menu bar.
  2. Creating new CCS project
    In the New CCS Project dialog, type a Project Name. For example, to begin creating a project using "hello world" example code provided with SYS/BIOS, you can type "hello". The default project location automatically reflects the project name. Then, click Next.
  3. Select your platform type in the Project Type field. For example, you might select "C6000". Then, click Next.
  4. Click Next on the "Additional Project Settings" page.
  5. Device variant fields
    In the Device Variant row of the "Project Settings" page, select a filter in the first field. This shortens the list of device variants in the second field. Then, select the actual device you are using. For example, you might select "Generic devices" in the filter field and "Generic C64x+ Device" in the second field. Depending on your device, you might also need to adjust the Device Endianness and Runtime Support Library settings.
  6. Click Next.
    Important: Don't click Finish at this point if you want to create a project that can use RTSC, XDCtools, or SYS/BIOS.
  7. Project templates
    On the "Project Templates" page, choose either the "Empty RTSC Project" template from the "Empty Projects" folder, or choose one of the example templates in the "SYS/BIOS > Generic Examples" folder. For example, you can select the Hello example, which uses the XDCtools System module. (If you have other RTSC-enabled software, such as IPC, installed, you can choose a template for that software.) Then, click Next.
  8. Example configuration settings
    On the "RTSC Configuration Settings" page, make sure the versions of XDCtools, SYS/BIOS, and other products that you want to use are selected. By default, the most recent versions are selected.
  9. The RTSC Target setting is based on device settings you made on earlier pages, and should not need to be changed.
  10. Also on the "RTSC Configuration Settings" page, click the drop-down arrow next to the RTSC Platform field. CCS scans the available packages for available platforms. Click on the list and choose the platform you want to use.
  11. You can choose which libraries you want the configuration build to link with in the RTSC Build-Profile field.
  12. Project list
    Click Finish to create a new project and add it to the C/C++ Projects list in CCS.

The RTSC target and platform are key parameters that describe your embedded hardware environment. See Using Targets and Platforms for more information on choosing a RTSC target and platform for your project. Check the ti.targets package and ti.platforms.* packages for pre-built targets and platforms suitable for use in CCS.

Using a RTSC project template

When you are creating a CCSv4 project that enables RTSC support, you can select a project template that includes a RTSC configuration. When you highlight a template, a brief description is provided to the right. Most of the SYS/BIOS project templates result in a CCS project that contains both a default .c source file and a default .cfg RTSC configuration file.

If you want to create two separate projects--one containing C source files, and another containing the RTSC configuration file--select the "SYS/BIOS > Generic Examples > Task Example (separate config project)" template. The configuration project is referenced by the main project, and is automatically built when you build the main project.

See the SYS/BIOS Getting Started Guide (in the SYS/BIOS installation) for further descriptions of the SYS/BIOS templates you see on the Project Templates page of the project creation wizard.

Adding files to projects

If you create a project using a RTSC project template, source files are automatically added to your projects, and you can modify those files as needed.

If you chose to use an empty project template, you can add C source files to your CCS project by selecting the main application project and doing any of the following:

  • New file types
    Creating a new file. From CCSv4's menus, choose File > New > Source File (or File > New > Header File).
  • Copying an existing file. From CCSv4's menus, choose Project > Add Files to Active Project. Browse to the folder than contains the file you want to add. Select the file and click Open. This copies the file to the directory that contains your project.
  • Linking to an existing file. From CCSv4's menus, choose Project > Link Files to Active Project. Browse to the folder than contains the file you want to add. Select the file and click Open. This links to the file in the directory where it was stored.

If you chose to use an empty project template, you can add a RTSC configuration file to your CCS project by choosing File > New > RTSC Configuration File.

The folders listed in the 'Includes' list of the CCS project tree (except for the compiler-related folder) are folders that are on the RTSC package path.

If you expand the node for a source file in the project list, it lists the header files it references and the functions it contains.

Using XGCONF to edit RTSC configurations

XGCONF is a tool that allows you to graphically create and view RTSC configuration scripts. (If you have used DSP/BIOS 5.x, it is somewhat similar to the DSP/BIOS Configuration Tool.)

To start XGCONF, follow these steps:

  1. Make a project that contains a RTSC configuration file (with a 'cfg' extension) the "Active" project. You can do this by right-clicking on the project in the "C/C++ Projects" view and selecting Set as Active Project. This step is important since XGCONF works with the properties of the current active project.
  2. Right-click on the RTSC configuration file and select Open with > XGCONF.

You can watch a demo that shows how to use XGCONF. For further information about using XGCONF, see the XGCONF User's Guide.

Building the project

When you build an application project, the associated RTSC configuration file is rebuilt if the configuration has been changed.

To build the project, follow these steps:

  1. Make sure the project is the active project. (If it isn't active, right-click on the project and select Set as Active Project from the menu.)
  2. Choose Project > Build Active Project.
  3. Examine the Console log to see if errors occurred.

For help with build errors, see Troubleshooting.

The RTSC configuration step occurs before compiling the .c files in your application, or whenever the prog.cfg file changes. CCStudio runs a command-line tool called "configuro" that processes the configuration script and outputs static C data structures and code to be linked with your application.

Configuro can be used to integrate RTSC configuration into other build systems, command-line or graphical. For more information, see Consuming Configurable Content.

After you build the project, look again at the C/C++ Projects view. You can expand the Debug folder to see the files that were generated by configuro and the build process. Notice that the project build flow diagram shown here references certain important files that were generated by configuro.

RTSC project build flow

Rules for working with CCS Build Settings

After you have created a CCS project that contains a RTSC configuration file, you can change the properties of the project in CCSv4 by right-clicking the project name and choosing Properties.

In the "CCS Build Settings" category of the Properties dialog, the General tab applies to compiler settings, the RTSC Configuration tab applies to the "configuro" utility used to process the .cfg file, and the Link Order tab applies to the linker settings.

Note that if there is any platform-specific configuration in your .cfg file, you much change those settings in addition to any platform-related changes you make to the CCS Build Settings.

If your configuration file is stored in a separate project from the project that contains your source code files, you should be careful about changing the CCS Build Settings for a RTSC configuration project. The build settings for the configuration project much match or be compatible with those of all application projects that reference the RTSC configuration project. So, if you change the CCS Build Settings for a RTSC configuration project, you should also change the build settings for the application projects that use that configuration.

Running and debugging an application

If you haven't already created a default target configuration, follow these steps or watch the demo:

  1. Choose File > New > Target Configuration File.
  2. Type a filename for the target configuration, which will be stored as part of the CCS project. For example, you might type TCI6482sim.ccxml if that reflects the target you want to use. Then, click Finish.
  3. In the Connection field for your target configuration, choose the type of connection you have to the target. Then type part of the target name in the Device filter field. For example, you might choose the "TI Simulator" connection and filter by "64xp" to find a C64x+ simulator.
  4. Choose File > Save or click the Save icon to save your target configuration.
  5. You can right-click on a target configuration and choose Set as Default Target to set which target configuration is used for debugging.

To debug an application, follow these steps:

  1. debug view
    Choose Run > Debug Active Project or click the bug icon. This loads the program and switches you to the "Debug" perspective.
  2. Set a breakpoint at line 10 by placing your cursor in the line of prog.c and clicking the hand icon.
  3. Press F8 to run to the breakpoint.

  4. Look at the messages in the "Console" tab.

For Eclipse-based debugging of applications that use RTSC modules, XDCtools provides the Runtime Object Viewer (ROV). For information on using this tool, see Runtime Object Viewer (ROV).

See also

RTSC+Eclipse FAQs Using RTSC with Eclipse-Based Tools
XGCONF User's Guide Using the RTSC Graphical Configuration Tool in CCSv4
Runtime Object Viewer Using ROV for Eclipse-Based Debugging
RTSC Module Primer Producing and consuming spec'd modules
Using Targets and Platforms Introduction to targets and platforms
Using xdc.runtime System How to boot, print a message, and shutdown
Overview of xdc.runtime Introduction to the xdc.runtime package

Flash demos

Demo of RTSC Project Creation in CCSv4 Using CCStudio v4 to create a RTSC project
Demo of XGCONF in CCSv4 Using XGCONF to create a RTSC configuration
Demo of Target Configuration Creation in CCSv4 Using CCStudio v4 to create a target configuration for debugging
Demo of DSPBIOS 5.x Project Creation in CCSv4 Using CCStudio v4 to create a DSP/BIOS 5.x project
Demo of the RTSC Platform Wizard in CCSv4 Using CCS to create a custom RTSC platform


[printable version]  [offline version]offline version generated on 21-Apr-2014 09:04 UTC 
Copyright © 2008 The Eclipse Foundation. All Rights Reserved
Personal tools
package reference