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.

[参考译文] 编译器/TMS320F28066:未使用函数的编译器选项

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/728007/compiler-tms320f28066-compiler-options-for-unused-functions

器件型号:TMS320F28066

工具/软件:TI C/C++编译器

您好!  

有一个有关编译器的请求。 它是否具有未使用函数的选项? 有一些函数如 fun1 ()和 fun2 ()、它们在*。c 文件中定义、但在项目中从未调用。 是否可以只编译 fun1 ()和 fun2 ()、而不链接到*。out?  

也就是说、我不想在*。out 中看到 fun1 ()和 fun2 ()。 有可能吗?

非常感谢。

BR、Jordan

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

    约旦

    我想这应该发布到编译器论坛、您最好指出您使用的是哪个版本的 CGT:

    https://e2e.ti.com/support/development_tools/compiler/

    这应该与器件无关、但可以为所有器件提供支持。

    您可以根据 CGT 用户指南 spru514检查-gen_func_subsections 或-mo 命令、或者、 如果 CCS 版本和 CGT 版本可以支持、只需在 Build -> C2000编译器-> Advanced options -> Runtime model options 选项卡下的构建选项中启用它。

    此致、

    张卫健