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.

[参考译文] CCS12定义的常量未正确使用

Guru**** 2577385 points


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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1135715/ccs12-defined-constants-are-not-being-used-correctly

CCS12更奇怪的事情。  

我在头文件中定义一个常数。

#define cstSpeedMultiplier 6.556  

我尝试在加载值时使用它。

    pntMotor->intSlewSpeed = 305064 * cstSpeedMultiplier;

回到 CCS9、一直回到 CCS3.3、一切都正常。 现在、代码已编译并运行。 然而、当我检查变量时、它是零。 它就像编译器/链接器等未使用常量一样

现在发生什么事了?

David