预览加载中,请您耐心等待几秒...
1/4
2/4
3/4
4/4

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

CCSv3.3开发环境Stepbystep CCSv3.3开发环境Stepbystep(1) Step1:创建一个工程,同时增加一个c文件,消除所有的编译、链接错误和警告。 1、创建一个项目工程: 通过菜单:Project>New,然后在ProjectCreation对话框中输入: ProjectName:hello Location:C:\test\hello\ ProjectType:Executable(.out) Target:TMS320C55XX 点击Finish完成工程创建。 这时在C:\test\hello\目录下得到二个基本的文件: hello.pjt-工程文件 hello.sbl hello.pjt文件的内容如下: ;CodeComposerProjectFile,Version2.0(donotmodifyorremovethisline) =》文件头,用于CCS识别文件版本等信息,注意不能被手工修改!!! [ProjectSettings]=》项目信息 ProjectDir="C:\test\hello\"=》指向项目文件的绝对路径。而项目文件中的相对路径都是基于 该路径而然 ProjectType=Executable=》项目类型,指项目工程用于生成一个可执行的文件还是库文件 CPUFamily=TMS320C55XX=》CPU家族 Tool="Compiler" Tool="CustomBuilder" Tool="DspBiosBuilder" Tool="Linker" Config="Debug" Config="Release" ["Compiler"Settings:"Debug"]=》编译器选项 Options=-g-fr"$(Proj_dir)\Debug"-d"_DEBUG" ["Compiler"Settings:"Release"] Options=-o2-fr"$(Proj_dir)\Release" ["Linker"Settings:"Debug"]=》链接器选项 Options=-c-m".\Debug\hello.map"-o".\Debug\hello.out"-w-x ["Linker"Settings:"Release"] Options=-c-m".\Release\hello.map"-o".\Release\hello.out"-w-x 2、增加文件 鼠标右键,点击“AddFilestoProject...”,增加一个hello.c文件到项目工程中 hello.c文件内容如下: #include<stdio.h> voidmain(void) { printf("Helloword!\n"); } 3、编译、修改错误 编译得到错误信息如下(这些也可以直接从文件cc_build_Debug.log中得到): -----------------------------hello.pjt-Debug----------------------------- [hello.c]"C:\CCStudio_v3.3\C5500\cgtools\bin\cl55"-g-fr"C:/test/hello/Debug"-d"_DEBUG" -@"Debug.lkf""hello.c" Warning:TheprojecthasnocmdfilewhiletheTextLinkerisselected [Linking...]"C:\CCStudio_v3.3\C5500\cgtools\bin\cl55"-@"Debug.lkf" <Linking> >>warning:creatingoutputsection.constwithoutSECTIONSspecification >>warning:entrypointsymbol_c_int00undefined undefinedfirstreferenced symbolinfile ------------------------- _printfC:\\test\\hello\\Debug\\hello.obj >>error:symbolreferencingerrors-'./Debug/hello.out'notbuilt >>Compilationfailure BuildComplete, 2Errors,4Warnings,0Remarks. 这是没有为工程指定选用具体的rts库文件所致;两种方法可以用来进行修正, 方案一、直接将所需要的库文件加到项目工程中,譬如:鼠标右键,点击“AddFilesto Project...”,选中:C:\CCStudio_v3.3\C55