CCS v3.3开发环境Step by step

上传人:飞*** 文档编号:4657983 上传时间:2017-08-21 格式:DOC 页数:5 大小:33.50KB
返回 下载 相关 举报
CCS v3.3开发环境Step by step_第1页
第1页 / 共5页
CCS v3.3开发环境Step by step_第2页
第2页 / 共5页
CCS v3.3开发环境Step by step_第3页
第3页 / 共5页
CCS v3.3开发环境Step by step_第4页
第4页 / 共5页
CCS v3.3开发环境Step by step_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《CCS v3.3开发环境Step by step》由会员分享,可在线阅读,更多相关《CCS v3.3开发环境Step by step(5页珍藏版)》请在金锄头文库上搜索。

1、1、创建一个项目工程:通过菜单:ProjectNew, 然后在 Project Creation 对话框中输入:Project Name: helloLocation: C:testhelloProject Type: Executable (.out)Target: TMS320C55XX 点击 Finish 完成工程创建。这时在 C:testhello 目录下得到二个基本的文件:hello.pjt - 工程文件hello.sblhello.pjt 文件的内容如下:; Code Composer Project File, Version 2.0 (do not modify or remo

2、ve this line)=文件头,用于 CCS 识别文件版本等信息,注意不能被手工修改!Project Settings = 项目信息ProjectDir=C:testhello = 指向项目文件的绝对路径。而项目文件中的相对路径都是基于该路径而然ProjectType=Executable =项目类型,指项目工程用于生成一个可执行的文件还是库文件CPUFamily=TMS320C55XX = CPU 家族Tool=CompilerTool=CustomBuilderTool=DspBiosBuilderTool=LinkerConfig=DebugConfig=ReleaseCompile

3、r Settings: Debug = 编译器选项Options=-g -fr$(Proj_dir)Debug -d_DEBUGCompiler Settings: ReleaseOptions=-o2 -fr$(Proj_dir)ReleaseLinker Settings: Debug = 链接器选项Options=-c -m.Debughello.map -o.Debughello.out -w -xLinker Settings: ReleaseOptions=-c -m.Releasehello.map -o.Releasehello.out -w -x2、增加文件鼠标右键,点击“A

4、dd Files to Project.”,增加一个 hello.c 文件到项目工程中hello.c 文件内容如下:#include void main(void)printf(Hello word!n);3、编译、修改错误编译得到错误信息如下(这些也可以直接从文件 cc_build_Debug.log 中得到):- hello.pjt - Debug -hello.c C:CCStudio_v3.3C5500cgtoolsbincl55 -g -frC:/test/hello/Debug -d_DEBUG -Debug.lkf hello.cWarning: The project has

5、no cmd file while the Text Linker is selectedLinking. C:CCStudio_v3.3C5500cgtoolsbincl55 -Debug.lkf warning: creating output section .const without SECTIONS specification warning: entry point symbol _c_int00 undefinedundefined first referencedsymbol in file- -_printf C:testhelloDebughello.obj error:

6、 symbol referencing errors - ./Debug/hello.out not built Compilation failureBuild Complete,2 Errors, 4 Warnings, 0 Remarks.这是没有为工程指定选用具体的 rts 库文件所致;两种方法可以用来进行修正,方案一、直接将所需要的库文件加到项目工程中,譬如:鼠标右键,点击“Add Files to Project.”,选中:C:CCStudio_v3.3C5500cgtoolslibrts55.lib;方案二、修改链接器的链接参数即可;譬如:鼠标右键,点击“Build Option

7、s.”,选 Linker Tab, Category 中选 Libraries, 设置 Inc. Libraries (-l): 为 rts55.lib;一般来说,方案二为推荐使用,便于项目工程文件的移动、拷贝,特别组内多人开发使用!重新编译,其结果如下:- hello.pjt - Debug -hello.c C:CCStudio_v3.3C5500cgtoolsbincl55 -g -frC:/test/hello/Debug -d_DEBUG -Debug.lkf hello.cWarning: The project has no cmd file while the Text Lin

8、ker is selectedLinking. C:CCStudio_v3.3C5500cgtoolsbincl55 -Debug.lkf warning: creating output section vectors without SECTIONS specification warning: creating output section .const without SECTIONS specification warning: creating output section .cio without SECTIONS specification warning: creating

9、.stack section with default size of 500 words.Use-stack option to change the default size. warning: creating .sysstack section with default size of 500 words.Use-sysstack option to change the default size. warning: creating .sysmem section with default size of 1000 words.Use-heap option to change th

10、e default size.Build Complete,0 Errors, 7 Warnings, 0 Remarks.Ok, 成功,消除了所有的编译错误,但还是有一些 Warning;怎么办?呵呵,咱们接着看4、消除编译警告增加一个.cmd 配置文件将 C:CCStudio_v3.3C5500cgtoolsliblnk.cmd 文件拷贝到 c:testhellohello.cmd同时将 hello.cmd 文件加入到项目工程当中即可。- hello.pjt - Debug -hello.c C:CCStudio_v3.3C5500cgtoolsbincl55 -g -frC:/test/

11、hello/Debug -d_DEBUG -Debug.lkf hello.cLinking. C:CCStudio_v3.3C5500cgtoolsbincl55 -Debug.lkfBuild Complete,0 Errors, 0 Warnings, 0 Remarks.非常幸运,搞定一个基本的工程以及所有相关的编译错误和告警。5、小结这些文件需要做备份、保留:hello.pjthello.cmdhello.c另外还有临时文件:hello.sbl = 动态生成的二进制项目工程Debug.lkf = 链接器选项参数cc_build_Debug.log = 编译链接的 Log 文件临时目录

12、:Debug = 生成的输出文件和临时 Object file.hello.CS_继续使用(1)中的工程文件菜单 FileNewNew DSP/BIOS Configuration,对话框中选择相应的 Platform,譬如:C55XX 中的 ti.platform.evm5509A,然后点击 OK,系统将打开一个 Configuration 1*的配置文件,将其保存为 hello.tcf。弹出错误信息如下:js: ./hello.tcf, line 11: Heaps are enabled, but the segment for DSP/BIOS Objects (MEM.BIOSOBJ

13、SEG) is not set correctly. Please create a heap in one of your data segments and set MEM.BIOSOBJSEG to it./, line 3Correct any script errors in C:/test/hello/hello.tcfusing the Configuration Tool or a text editor, if necessary.TConf initialization arguments:-e environmentconfig.importPath=D:/CCStudi

14、o_v3.3/bios_5_31_02/packages;D:/CCStudio_v3.3/bios_5_31_02/packages; -e environmentconfig.scriptName=6E8.tcf选中 MEM 的 General 属性中 No Dynamic Memory Heaps,再次保存,告警消失,OK。将 hello.tcf 加入到工程文件当中,编译发现大量的错误和告警:- hello.pjt - Debug -hello.tcf D:CCStudio_v3.3bios_5_31_02xdctoolstconf -b -Dconfig.importPath=D:/CCStudio_v3.3/bios_5_31_02/packages; hello.tcfhellocfg.s55 D:CCStudio_v3.3C5500cgtoolsbincl55 -g -frC:/test/hello/Debug -d_DEBUG -Debug.lkf hellocfg.s55hellocfg_c.c D:CCStudio_v3.3C5500cgtoolsbincl55 -g -frC:/test/hello/Debug -d_DEBUG -De

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 研究报告 > 综合/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号