Code Composer Studio v4 DSP/BIOS Project

转载 2011年01月15日 20:15:00


This module describes how to create a Code Composer Studio (CCS) project that executes a simple DSP/BIOS based program. The target will be the TI simulator and the processor used is the TMS320C67xx.

Create a DSP/BIOS CCS project

To create a CCS project select File->New->CCS Project.

Figure 1: Screenshot of CCS Project menu
Figure 1 (graphics1.png)

This will bring up a window where you can enter the name of the project. The location selected is the default location for project files. Press Next.


Figure 2: CCS Project name and location
Figure 2 (graphics2.png)


Since the example uses the TMS320C67xx processor the project type selected is C6000. The project configurations are Debug and Release. Select the Next button.


Figure 3: Type of CCS project
Figure 3 (graphics3.png)


If there are any project dependencies they are selected on the next screen. Select the Next button.


Figure 4: CCS Project dependencies
Figure 4 (graphics4.png)


On the Project Settings Screen, select the items that pertain to the type of project to be created. Since the project will be executed select Output Type: Executable. The processor type is TMS320C67xx so the Device Variant is Generic C67xx Device. This project will use Little Endian. The code generation tools are the latest version (in this case TI v7.0.3). The runtime support library is selected to match the device variant and the endianness selected. The library can be selected automatically. Press Next.


Figure 5: Project settings window
Figure 5 (graphics5.png)


Since the project will be based on DSP/BIOS an empty DSP/BIOS example project. This will set up project parameters for DSP/BIOS.

Figure 6:
Figure 6 (graphics6.png)

After the projects settings have been set, select Finish and the project will show up in the C/C++ Projects view.

Figure 7: C/C++ projects view
Figure 7 (graphics7.png)

Add a DSP/BIOS configuration file

The easiest way to set up DSP/BIOS in a CCS project is to use the DSP/BIOS configuration tool. This generates a file with a .tcf extension that is included in the project. This file will generate code that gets included in the project for setting up DSP/BIOS. It also generates a header file that can be included in other C/C++ files. For the file name dspbiosproject.tcf the header file name will be dspbiosprojectcfg.h.

To create a DSP/BIOS configuration file, select File->New->DSP/BIOS v5.xx Configuration File (you may need to select File->New->Other first, then select DSP/BIOS v5.xx Configuration File). This will bring up a dialog where the name of the file is entered.

Figure 8: DSP/BIOS Configuration file name
Figure 8 (graphics8.png)

There are default configuration files for different devices. For this example the C67xx simulator is used. The configuration will have 16Mbytes of SDRAM in the memory section. Select Next and a dialog for the DSP/BIOS features will come up.


Figure 9: DSP/BIOS platform for default settings
Figure 9 (graphics9.png)


Figure 10: DSP/BIOS features selection
Figure 10 (graphics10.png)

Select Finish and a new file is created with the default configuration and is added to the project and the configuration tool is opened.

Figure 11: DSP/BIOS configuration tool
Figure 11 (graphics11.png)

In the configuration tool is where the DSP/BIOS objects are set up. In this example there are only two objects that will be set up. The first is a trace log that is common to many DSP/BIOS projects. The second is a task object that will be used to print to the log.

To set up the LOG object, expand the Instrumentation item and right click on the LOG item. Select Insert LOG and give the LOG object the name trace.

Figure 12: Insert LOG menu item
Figure 12 (graphics12.png)
Figure 13:
Figure 13 (graphics13.png)
Figure 14: DSP/BIOS configuration tool showing the trace LOG object
Figure 14 (graphics14.png)

Next insert a task (TSK) object and give it the name TSK0.


Figure 15: Inserting a TSK object
Figure 15 (graphics15.png)



Figure 16: TSK object
Figure 16 (graphics16.png)


In order for the TSK object to be associated with a function the Task function name must be changed. Right click on the TSK0 object and select Properties. Under the Function tab, type _funTSK0. Be sure to include the underscore at the beginning of the name. The C program function name will be funTSK0 but the assembly code name will have an underscore at the beginning. Be sure to note that the name of the task object and the name of the function that it uses cannot be the same name. In this example the object name is TSK0 and the function name if funTSK0.

After the objects have been set up, save and close the configuration file.

When your project gets built, the configuration file automatically generates files. One of these files is a header file that can be used in your programs. If your configuration file is named file.tcf then the header file that gets made will be called filecfg.h. In the source files that use the DSP/BIOS object this header file can be included. Use a statement like:

#include "filecfg.h"

Add code files

When using DSP/BIOS in a project, very little code is in the main function. Other objects are used like tasks and interrupts. In this example a simple task will be made that prints to a LOG buffer. Create a new C program file. Select File->New->Source File.


Figure 17: New source file
Figure 17 (graphics17.png)


The New Source File dialog opens and you can enter the source file name. Add a .c extension for a C program file. The source folder should be the folder of your project. Select Finish and a new file is opened.

Figure 18: New source file dialog
Figure 18 (graphics18.png)

Enter the C code. The file must contain a main function. After entering the code, save the file.

#include <std.h>
    #include <log.h>
    #include <tsk.h>
    #include "dspbiosprojectcfg.h" //header generated by dspbiosproject.tcf
    void main(void){
    LOG_printf(&trace,"In main function");
    void funTSK0(void){
    LOG_printf(&trace,"In TSK0");

In the code above, note that the header file dspbiosprojectcfg.h is included. This is the header file generated by the DSP/BIOS configuration file. Also, the function funTSK0 is the function that will be executed when TSK0 gets scheduled to run.

Create a target configuration

In order to build and run your project you need to have a target configuration. This file will contain information about the emulator that will be used and the target processor. In this module the target configuration will be the TI simulator for the C6713 processor.

First select File->New->Target Configuration File.

Figure 19: Open new target configuration file
Figure 19 (graphics19.png)

In the New Target Configuration dialog enter the configuration file name ending in the .ccxml file extension. Put the file in the project directory. Select Finish and a new target configuration file opens.


Figure 20: Target configuration dialog
Figure 20 (graphics20.png)


In the target configuration, select the connection needed (simulator or some type of emulator, etc.) and the type of device. In this example the TI simulator is used with the C6713 little endian simulator device. Select Save when done.

Figure 21: Target configuration setup
Figure 21 (graphics21.png)

Now the target configuration is in the project.


Figure 22: Project files
Figure 22 (graphics22.png)


Debug the project

To start a debug session either select Target->Debug Active Project or press the debug icon in the menu bar.

Figure 23: Debug icon
Figure 23 (graphics23.png)

When the debug session starts the code files are compiled and linked into an executable file and the file is loaded onto the target. The initialization code is executed and the program is halted at the beginning of the main function.

Figure 24: Debugging session
Figure 24 (graphics24.png)

In order to be able to see the LOG print text the real time analysis (RTA) data stream must be turned on. Select Tools->RTA->Print Logs which will open up the LOG print window. Select the Stream RTA data button on the right part of the menu bar. The icon is depressed in the figure.


Figure 25: Turn on the RTA data stream
Figure 25 (graphics25.png)


Icons on the debug window can be used to run the program and other debugging tools.

Figure 26: Debugging tools
Figure 26 (graphics26.png)

Press the green arrow to run the program. The main function will be executed and the program will leave the main function. After the main function executes the TSK0 object is schedule and the tsk0 function is executed. Both functions print to the trace LOG object. The output can be viewed in the Printf Logs window.

Code Composer Studio - 文件比较

Code Composer Studio - 文件比较         鼠标单击选中一个文件,再同时按住 Ctrl + 鼠标左键来选中第二个文件,在其中一个文件上鼠标右击选择 Compare Wit...
  • chengyq116
  • chengyq116
  • 2018年01月22日 22:21
  • 41

Code Composer Studio 3.3 to 5.5 导入工程 问题————1

序: 第一次用 Code Composer Studio ,还是有点不习惯,使用中犯了很多小错误,现在记录下来,方便以后像我一样的朋友少走些弯路。 正文: 工程导入后,不能仿真,因为...
  • kuailedaren123
  • kuailedaren123
  • 2014年09月12日 09:15
  • 974

Code Composer Studio 7.3.0安装错误。

第一次安装发生错误:ccs_update_5.5.0.00091.exe dode no exist。 第二次安装发生错误:session context was...... 安装成功后的问题,编...
  • qq_17033619
  • qq_17033619
  • 2017年09月26日 22:14
  • 325

CCS4(Code Composer Studio)的基本使用教程

CCS4(Code Composer Studio)的基本使用教程
  • jasonwoodlee
  • jasonwoodlee
  • 2011年07月21日 21:15
  • 1467

使用CCS(Code Composer Studio)建立一个例程

一、准备工具 用户源文件 CCS5.1 XDS100V2仿真器 DSP28035核心板 二、安装CCS(比较简单,这里不再赘述) 安装后的启动界面 三、建立工程 1、点击 New CC...
  • xidaoliang
  • xidaoliang
  • 2016年01月27日 17:06
  • 1408


DSP/BIOS详解入门 目录(?)[-] DSPBIOS简介 DSPBIOS的组件构成DSPBIOS的启动顺序DSPBIOS的配置 Global Setting Propertie...
  • sujunzy666
  • sujunzy666
  • 2013年12月09日 11:15
  • 1375


从环境说到搭建第一个工程请注意,此文默认读者已经对DSP及CCS V3.3环境有一定的了解了,知道cmd文件的配置,知道新建工程,编译并连接仿真器下载!如果你对这些还都不熟悉,请先熟悉这些!当然,最好...
  • xiahouzuoxin
  • xiahouzuoxin
  • 2014年07月24日 15:43
  • 18291


  • xiahouzuoxin
  • xiahouzuoxin
  • 2014年07月25日 19:39
  • 4623


一、CCS3.3,建立BIOS环境的过程 1,从Project菜单选择New,建立项目工程.prj 2,从File菜单选择New -> DSP/BIOS configuration ..,...
  • jhh_move_on
  • jhh_move_on
  • 2014年06月07日 10:37
  • 4506


DSP/BIOS的高级应用 DSP在同一时间执行多个任务,当外部数据变为有效或者出现控制信号时,对外部事件进行响应。 通常将这些任务称为线程,DSP/BIOS采用广义的定义:DSP执行的所有独...
  • pugu12
  • pugu12
  • 2016年01月26日 16:49
  • 793
您举报文章:Code Composer Studio v4 DSP/BIOS Project