CCSv7使用指南连载3:CCS文件及编译构建过程

本文是CCSv7使用指南的第三篇,讲解如何在同一workspace管理工程,介绍CCS工程文件夹下的各类文件及其作用,并详细阐述编译构建过程,包括预编译、编译、链接等步骤。此外,还讨论了后构建过程,如生成.hex和.bin文件的方法,以及解决文件过大问题的策略。
摘要由CSDN通过智能技术生成

版权声明:本系列文章欢迎转载,请注明出处,谢谢!
1 摘要
CCSv7是Texas Instruments针对自家嵌入式处理器或者单片机开发推出的集成开发环境,同时CCSv7也是完全免费的开发软件。本系列文章主要目的是介绍CCS使用入门及在实际项目开发过程中有用的技巧及方法,第3篇介绍如何在同一个workspace下面管理工程以及相应CCS文件的介绍。

2 打开或者关闭工程
有时候在同一个workspace里面会有多个工程,短时间内不会用到的工程建议将其close掉,如下图所示。当这个工程被close了,仍然会在workspace里面保留,但是没法打开其中的源文件或者修改,而且关闭的工程会占用更少的电脑缓存,会提高CCS的使用性能。另外,被close的工程又可以通过右键将其open。
这里写图片描述
3 CCS工程文件夹下的文件
当我们打开CCS工程(以C2000 controlsuite下的例程为例)后,可以看到如下图所示的文件。
这里写图片描述
基本作用如下所示
基本作用如下所示(摘自TI相关文档)
.ccsproject: Stores project settings contributed by TI
Ex: Stores initial device/toolchain settings entered by user at project creation
.cproject: Stores project settings contributed by CDT (C/C++ Development Tooling)
Ex: Stores most of the build properties under the ‘Build’ section (most of the compiler/linker options)
.project: Stores project settings contributed by Eclipse
Ex: Stores information for linked resources, linked resource variables, resource filters
.settings (folder): Stores project specific settings that differ from the default CCS settings (workspace preferences)
makefile.defs (SYS/BIOS): Additional make rules included by the generated project makefile for SYS/BIOS projects
4 构建过程
在CCS中构建项目是将编译命令和输入文件传递到RTSC和编译器工具的步骤。 RTSC工具仅适用于涉及RTSC组件(IPC,SYS / BIOS等)的项目,并在构建器工具之前调用。每个构建工具接受组输入文件并生成输出文件。
下图显示了典型的软件开发流程,并提供了编译CCS项目时涉及的编译工具和文件的概念。所有这些都由makefile在后台处理,理解这个过程有助于理解工程编译的整个过程。
这里写图片描述
软件开发流程的最常见流程是通过Compliler/Assembler/Linker从C / C ++源文件到可执行文件。Assembler步骤通常在后台运行,对用户是隐藏的。
Compiler: accepts C/C++ source files and produces assembly language source code.
Assembler: translates assembly language source files into machine language relocatable object files.
Linker: combines relocatable object files into a single absolute executable object file. It accepts relocatable object files and object libraries as input.
Archiver: allows you to collect a group of files into a single archive file, called a library. It also allows you to modify a library by deleting, replacing, extracting, or adding members.
Library build utility: allows you to build customized run-time-support libraries.
5 后构建过程
.out可执行文件生成了以后,可以使用CCS将文件加载到芯片中进行调试,或者将其转化为hex格式,使用hex编程器去进行编程。后构建过程主要包括下图中标注成蓝色的过程,
这里写图片描述

Hex conversion utility: converts an object file into other hex formats.
Absolute Lister: accepts linked object files as input and creates .abs files as output. You can assemble these .abs files to produce a listing that contains absolute, rather than relative, addresses.
Cross-reference Lister: uses object files to produce a cross-reference listing showing symbols, their definitions, and their references in the linked source files.
Object file utilities: comprises of utilities suc

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值