This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS 中的释放模式和调试模式

Guru**** 2589265 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1012150/release-mode-and-debug-mode-in-ccs

在 CCS 中以发布模式编译代码与以调试模式编译代码有何区别?  您能否详细说明执行时间、所需内存和内存部分?

此致

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Asif、

    Debug 和 Release 是许多示例工程中存在的编译配置。  CCS 中的工程可以具有一个或多个编译配置。  编译配置指定要使用的编译器版本、编译器的设置和选项、要包括/排除的源文件...  因此、根据配置中的设置、对执行时间和内存使用的影响可能不会有任何影响或显著。

    通常、用户会将调试构建配置设置为 启用完整的符号调试信息、以提高调试应用的能力。  从发布配置中删除调试信息并使用更高级别的优化也很常见。  请注意、每个配置使用的构建选项完全由您控制。

    使用 CCS 中的内存分配视图可以帮助您了解内存使用情况。  可从"View"菜单打开"Memory Allocation"视图。  您需要测量的执行时间。  我不知道您使用的是哪种器件、但有一些有关 CCS 的技术讲座、介绍了如何测量性能。   对于小段代码、这可以使用配置文件时钟来完成。   https://dev.ti.com/tirex/explore/node?node=AAIf3mqiIfhQbPJzrtjEcA__FUz-xrs__LATEST

    此致、

    John

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Asif、

    通过扩展 Johns 的答案并将您的第一个问题放在 Face 值、可以通过将编译器/链接器参数与文本进行比较来确定两个编译配置之间的明显差异。

    如果我 为 Delfino 创建新的 CCS 工程、我将获得以下 编译器开关:

     -v28
    -ml
    -mt.
    --cla_support=cla1
    --float_support=fpu32
    --tmu_support=tmu0
    --vcu_support=vcu2
    -O2
    --include_path="W:/CCS_workspace/ExampleCCS"
    --include_path="C:/ti/ccs1020/ccs/tools/compiler/ti-cgt-c2000_20.2.2.LTS/include
    --printf_support=minimal
    --diag_warning=225
    --diag_wrap=off
    --display_error_number
    --abi=eabi

    -v28
    -ml
    -mt.
    --cla_support=cla1
    --float_support=fpu32
    --tmu_support=tmu0
    --vcu_support=vcu2
    --include_path="W:/CCS_workspace/ExampleCCS"
    --include_path="C:/ti/ccs1020/ccs/tools/compiler/ti-cgt-c2000_20.2.2.LTS/include
    -g
    --printf_support=minimal
    --diag_warning=225
    --diag_wrap=off
    --display_error_number
    --abi=eabi

    上述两者之间的区别在于:

    -版本使用优化级别2 (-O2)、其中调试没有。

    - Release 没有符号调试信息。 (缺少-g)。

    当然、这些差异就是您在之后产生的差异。