CCS v3.3开发环境Step by step.doc_第1页
CCS v3.3开发环境Step by step.doc_第2页
CCS v3.3开发环境Step by step.doc_第3页
CCS v3.3开发环境Step by step.doc_第4页
CCS v3.3开发环境Step by step.doc_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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 remove this line)=文件头,用于CCS识别文件版本等信息,注意不能被手工修改!Project Settings = 项目信息ProjectDir=C:testhello =指向项目文件的绝对路径。而项目文件中的相对路径都是基于该路径而然ProjectType=Executable =项目类型,指项目工程用于生成一个可执行的文件还是库文件CPUFamily=TMS320C55XX = CPU家族Tool=CompilerTool=CustomBuilderTool=DspBiosBuilderTool=LinkerConfig=DebugConfig=ReleaseCompiler 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、增加文件鼠标右键,点击“Add 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 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: 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 Options.”,选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 Linker 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 .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 the 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/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文件临时目录: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.BIOSOBJSEG) 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:/CCStudio_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 -Debug.lkf hellocfg_c.cLinking. D:CCStudio_v3.3C5500cgtoolsbincl55 -Debug.lkf warning: creating output section .gblinit without SECTIONS specification warning: creating output section .rtdx_data without SECTIONS specification warning: creating output section .printf without SECTIONS specification warning: creating output section .sys without SECTIONS specification warning: creating output section .clk without SECTIONS specification warning: creating output section .hst1 without SECTIONS specification warning: creating output section .hst without SECTIONS specification warning: creating output section .pip without SECTIONS specification warning: creating output section .hst0 without SECTIONS specification warning: creating output section .hwi_vec without SECTIONS specification warning: creating output section .swi without SECTIONS specification warning: creating output section .sts without SECTIONS specification warning: creating output section .TSK_idle$stk without SECTIONS specification warning: creating output section .tsk without SECTIONS specification warning: creating output section .idlcal without SECTIONS specification warning: creating output section .idl without SECTIONS specification warning: creating output section .LOG_system$buf without SECTIONSspecification warning: creating output section .log without SECTIONS specification warning: creating output section .sysinit without SECTIONS specification warning: creating output section .vers without SECTIONS specificationundefined first referencedsymbol in file- -_CLK_start C:testhelloDebughello

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论