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.

[参考译文] TMS320F28386D:优化

Guru**** 2450850 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1236734/tms320f28386d-optimization

器件型号:TMS320F28386D

该项目将优化级别设置为1。

但我有一些不需要优化的函数代码、其中的关键字可以帮助解决这个问题?

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

    要减少文件中一个函数的优化、请使用 #pragma function_options 。  请在 C28x 编译器手册中搜索。  您将看到、您不能降低以下的优化 ——opt_level=0 。  为此、您必须将该函数隔离到自己的源文件中、然后针对 文件特定选项使用 CCS 功能 来设置 -- opt_level=off

    谢谢。此致、

    -乔治