|[printable version] [offline version]||offline version generated on 28-Sep-2016 07:09 UTC|
Using CCS 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. If you don't have CCS or prefer to use the the XDCtools command line tools directly, see Using XDCtools Commands.
Creating CCS projects that use RTSC
Follow these steps to use CCS to create a project that can use RTSC. You can also watch a demo that shows most of the steps in this page.
- Open CCS and choose File > New > CCS Project from the menu bar.
- 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_world". The default project location automatically reflects the project name.
- Select your platform type in the Target field. There are two drop-down lists for selecting a target. The first one narrows down the list of devices that can be selected in the second drop-down list. For example, you might select "Wireless Connectivity MCU" for the first list, and then choose "CC3200" in the second list.
- Clicking on the arrow next to "Advanced Settings" label opens up the fields where you can adjust the Output Type, Output Format, Device Endianness, Linker Command File and Runtime Support Library settings.
- When "Advanced Settings" pane is closed, "Project templates and examples" pane is open.
- Click Next.
Important: Don't click Finish at this point if you want to create a project that can use RTSC, XDCtools, or TI-RTOS.
- The RTSC Target setting is based on device settings you made on earlier pages, and should not need to be changed.
- 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.
- You can choose which libraries you want the configuration build to link with in the RTSC Build-Profile field.
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:
- 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:
- 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.
- Right-click on the RTSC configuration file and select Open with > XGCONF.
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:
- 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.)
- Choose Project > Build Active Project.
- 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.
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:
- Choose File > New > Target Configuration File.
- 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.
- 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.
- Choose File > Save or click the Save icon to save your target configuration.
- 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:
- icon. This loads the program and switches you to the "Debug" perspective.
- Set a breakpoint at line 10 by placing your cursor in the line of prog.c and clicking the icon.
- Press F8 to run to the breakpoint.
- 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).
|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|
|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 28-Sep-2016 07:09 UTC|