ccsv3.3开发环境stepbystep

上传人:xiao****1972 文档编号:84147905 上传时间:2019-03-02 格式:DOC 页数:5 大小:33.50KB
返回 下载 相关 举报
ccsv3.3开发环境stepbystep_第1页
第1页 / 共5页
ccsv3.3开发环境stepbystep_第2页
第2页 / 共5页
ccsv3.3开发环境stepbystep_第3页
第3页 / 共5页
ccsv3.3开发环境stepbystep_第4页
第4页 / 共5页
ccsv3.3开发环境stepbystep_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《ccsv3.3开发环境stepbystep》由会员分享,可在线阅读,更多相关《ccsv3.3开发环境stepbystep(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 remove this

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

3、 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

4、 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 whil

5、e 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 referenc

6、ing 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, C

7、ategory中选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

8、. 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 de

9、fault 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 C

10、omplete,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

11、.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 fil

12、e.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 cre

13、ate 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:/CCSt

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 大杂烩/其它

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