ADS中debug,debugrel,release三个版本的区别

来源:互联网 发布:勇敢一点 薛之谦 知乎 编辑:程序博客网 时间:2024/05/18 22:10

在ADS1.2的CodeWarrior中,我们在建立项目时,一般在编译时有三种编译方式,即:Debug,DebugRel,Release。这三个版本的区别在于编译出来的目标文件是否包含调试信息(包含调试信息的多少),其中debug版本是对每个文件都增加调试信息,不进行优化,debugrel属于中间版本,是对某些文件增加调试信息,进行部分优化,release版本是最新版也就是最后的发行版,是将所有的代码进行优化,去除所有的调试信息。

下面是英文说明:

Debug
This build target is configured to build output binaries that are fully debuggable, at the expense of optimization. Use if you plan to build separate Debug and Release<BR>versions of your code. This build target provides the best debug view while you are developing your code. It is also configured to output basic image information in an error and messages window.

DebugRel
This build target is configured to build output binaries that provide adequate optimization, and give an adequate view. Use it if you plan to build a version of your code for debug, and release the same code to reduce testing.

Release
This build target is configured to build output binaries that are fully optimized, at the expense of debug information. Use it if you plan to build separate Debug and Release versions of your code. This build target outputs optimized code suitable for release.

另外:

一、生成的代码长度不一样,因为Debug版本不对代码进行优先,DebugRel进行少部分优化,Release对代码尽可能的优化。

二、其实我们知道,Debug或DebugRel版本我们往往是在调试时用,下载到目标版时,一般是下载到目标板的SDRAM进行。那么Debug的设置项RO_base,RW_base就可以设置成调试时的映射地址。而在Release设置项RO_base,RW_base就可以设置成实际运行时的映射地址。对三种编译方式设置好后,我们对不同的实际需要,选择不同的编译方式。

0 0
原创粉丝点击